def _interpret_emr_step_syslog(fs, matches):
 errors = []
 result = {}
 for match in matches:
  path = match['path']
  interpretation = _parse_step_syslog(_cat_log(fs, path))
  result.update(interpretation)
  for error in (result.get('errors') or ()):
   if ('hadoop_error' in error):
    error['hadoop_error']['path'] = path
   _add_implied_task_id(error)
   errors.append(error)
 _add_implied_job_id(result)
 if errors:
  result['errors'] = errors
 return result

def _interpret_emr_step_syslog ( fs , matches ) : errors = [ ] result = { } for match in matches : path = match [ 'path' ] interpretation = _parse_step_syslog ( _cat_log ( fs , path ) ) result . update ( interpretation ) for error in ( result . get ( 'errors' ) or ( ) ) : if ( 'hadoop_error' in error ) : error [ 'hadoop_error' ] [ 'path' ] = path _add_implied_task_id ( error ) errors . append ( error ) _add_implied_job_id ( result ) if errors : result [ 'errors' ] = errors return result
extract information from step syslog (see :py:func:_parse_step_log()) .