def METHOD_NAME(rule):
  """
  `parse_one_rule_from_dict` parses a `RedactionRule` from a dictionary like:
    {
      "description": "This is the first rule",
      "trigger": "triggerstring 1",
      "search": "regex 1",
      "replace": "replace 1"
    }
  Where the `trigger` and `replace` are strings, and `search` is a python
  regular expression.
  """
  rule.pop('description', None)
  trigger = rule.pop('trigger', None)
  case_sensitive = rule.pop('caseSensitive', True)
  if case_sensitive == 'false':
    case_sensitive = False
  elif case_sensitive == 'true':
    case_sensitive = True
  try:
    search = rule.pop('search')
  except KeyError:
    raise ValueError('Redaction rule is missing `search` field')
  try:
    replace = rule.pop('replace')
  except KeyError:
    raise ValueError('Redaction rule is missing `replace` field')
  if rule:
    raise ValueError('Redaction rule contains unknown field(s): %s' % list(rule.keys()))
  return RedactionRule(trigger, search, replace, case_sensitive)