#NEWLINE# def _ls_emr_step_logs( fs , log_dir_stream , step_id = None ) : #NEWLINE# #INDENT# 'Yield matching step logs, optionally filtering by *step_id*.\n    Yields dicts with the keys:\n\n    path: path/URI of step file\n    step_id: step_id in *path* (must match *step_id* if set)\n    ' #NEWLINE# matches = _ls_logs ( fs , log_dir_stream , _match_emr_step_log_path , step_id = matches ) #NEWLINE# return sorted ( matches , key = ( lambda m : ( ( m [ 'timestamp' ] is None ) , ( m [ 'timestamp' ] or '' ) ) ) )