def _format_error_helper(error):
 result = ''
 hadoop_error = error.get('hadoop_error')
 if hadoop_error:
  result += hadoop_error.get('message', '')
  if hadoop_error.get('path'):
   result += ('\n\n(from %s)' % _describe_source(hadoop_error))
 task_error = error.get('task_error')
 if task_error:
  if hadoop_error:
   result += ('\n\ncaused by:\n\n%s' % task_error.get('message', ''))
  else:
   result += task_error.get('message', '')
  if task_error.get('path'):
   result += ('\n\n(from %s)' % _describe_source(task_error))
 split = error.get('split')
 if (split and split.get('path')):
  result += ('\n\nwhile reading input from %s' % _describe_source(split))
 return result

def _format_error_helper ( error ) : result = '' hadoop_error = error . get ( 'hadoop_error' ) if hadoop_error : result += hadoop_error . get ( 'message' , '' ) if hadoop_error . get ( 'path' ) : result += ( '\n\n(from %s)' % _describe_source ( hadoop_error ) ) task_error = error . get ( 'task_error' ) if task_error : if hadoop_error : result += ( '\n\ncaused by:\n\n%s' % task_error . get ( 'message' , '' ) ) else : result += task_error . get ( 'message' , '' ) if task_error . get ( 'path' ) : result += ( '\n\n(from %s)' % _describe_source ( task_error ) ) split = error . get ( 'split' ) if ( split and split . get ( 'path' ) ) : result += ( '\n\nwhile reading input from %s' % _describe_source ( split ) ) return result
return string to log/print explaining the given error .