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