def METHOD_NAME(filename):
  """
  Parse a file into a `RedactionPolicy`, where each line comprises a redaction
  rule string as described in `parse_rules_from_string`.
  """
  with open(filename) as f:
    s = f.read().strip()
    # We treat empty files as allowing everything.
    if not s:
      return RedactionPolicy([])
    scheme = json.loads(s)
    try:
      version = str(scheme.pop('version'))
    except KeyError:
      raise ValueError('Redaction policy is missing `version` field')
    if version != '1':
      raise ValueError('unknown version `%s`' % version)
    try:
      rules = scheme.pop('rules')
    except KeyError:
      raise ValueError('Redaction policy is missing `rules` field')
    rules = [parse_one_rule_from_dict(rule) for rule in rules]
    if scheme:
      raise ValueError('Redaction policy contains unknown field(s): %s' % list(scheme.keys()))
    return RedactionPolicy(rules)