#NEWLINE# def _match_emr_step_log_path( path , step_id = None ) : #NEWLINE# #INDENT# 'Yields paths/URIs of all job history files in the given directories,\n    optionally filtering by *step_id*.\n    ' #NEWLINE# m = _EMR_STEP_LOG_PATH_RE . match ( path ) #NEWLINE# if ( not step_id ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if ( not ( ( step_id is None ) or ( m . group ( 'step_id' ) == step_id ) ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# return dict ( step_id = m . group ( 'step_id' ) , timestamp = m . group ( 'timestamp' ) )