parameters: (error_total, mismatch_total, missing_total, extra_total)
return_statement: return summary
docstring: Get one-line summary of validation results.
docstring_summary: Get one-line summary of validation results.
docstring_tokens: Get one - line summary of validation results .
function: def get_summary(error_total, mismatch_total, missing_total, extra_total):
    """Get one-line summary of validation results."""
    is_diff = mismatch_total or missing_total or extra_total
    if not error_total and not is_diff:
      return 'Validation successful. No differences detected.'
    summary = ''
    if error_total:
      summary += '%s errors validating model(s).' % (error_total)
    if is_diff:
      if summary:
        summary += ' '
      summary += ('Detected golden file differences. %s different, %s missing, %s'
                  ' extra.') % (mismatch_total, missing_total, extra_total)
    return summary
function_tokens: def get_summary ( error_total , mismatch_total , missing_total , extra_total ) : is_diff = mismatch_total or missing_total or extra_total if not error_total and not is_diff : return 'Validation successful. No differences detected.' summary = '' if error_total : summary += '%s errors validating model(s).' % ( error_total ) if is_diff : if summary : summary += ' ' summary += ( 'Detected golden file differences. %s different, %s missing, %s' ' extra.' ) % ( mismatch_total , missing_total , extra_total ) return summary