Load a single check from a file.

def LoadCheckFromFile(file_path, check_id, overwrite_if_exists=True):
  """Load a single check from a file."""
  configs = LoadConfigsFromFile(file_path)
  conf = configs.get(check_id)
  check = Check(**conf)
  check.Validate()
  CheckRegistry.RegisterCheck(
      check,
      source="file:%s" % file_path,
      overwrite_if_exists=overwrite_if_exists)
  logging.debug("Loaded check %s from %s", check.check_id, file_path)
  return check