def METHOD_NAME(config):
  """Checks whether each target file matches the corresponding generated file.
  Args:
    config: the Config object for this test.
  Returns:
    None if everything matches, otherwise a string error message.
  """
  diff_errors = []
  file_pairs = _GetFilePairs(config)
  missing_files, stale_files = _GetMissingAndStaleFiles(file_pairs)
  for pair in missing_files:
    diff_errors.append("File %s does not exist" % pair.target)
    continue
  for pair in stale_files:
    with open(pair.generated) as g, open(pair.target) as t:
        diff = ''.join(difflib.unified_diff(g.read().splitlines(keepends=True),
                                            t.read().splitlines(keepends=True)))
        diff_errors.append("File %s is out of date:\n%s" % (pair.target, diff))
  if diff_errors:
    error_msg = "Files out of date!\n\n"
    error_msg += "To fix run THIS command:\n"
    error_msg += "  bazel-bin/%s/%s --fix\n\n" % (config.package_name,
                                                  config.target_name)
    error_msg += "Errors:\n"
    error_msg += "  " + "\n  ".join(diff_errors)
    return error_msg
  else:
    return None