docs: def _set_key(log_prefix, result_dict, key, value, desc="parameter"):
      """
      Helper to set a key value in a dictionary.  This function issues a
      warning if the key has already been set, and issues a warning and
      returns without setting the value if the value is not surrounded
      by parentheses.  This is used to eliminate duplicated code from
      the rule parsers below.
  
      :param log_prefix: A prefix to use in log messages.  This should
                         be the configuration key.
      :param result_dict: A dictionary of results, into which the key
                          and value should be inserted.
      :param key: The dictionary key to insert.
      :param value: The value to insert into the dictionary.
      :param desc: A description of what the dictionary is.  This is
                   used in log messages help the user understand what
                   the log message is referring to.  By default, this
                   description is "parameter", indicating that entries
                   in the dictionary are parameters of something;
                   however, _parse_type_rule() also uses "token type" to
                   help identify its more complex tokens.
      """
  
      if key in result_dict:
          LOG.warn("%s: Duplicate value for %s %r" %
                   (log_prefix, desc, key))
          # Allow the overwrite
  
      # Demand the value be quoted
      if len(value) <= 2 or value[0] not in ('"', "'") or value[0] != value[-1]:
          LOG.warn("%s: Invalid value %r for %s %r" %
                   (log_prefix, value, desc, key))
          return
  
      # Save the value
      result_dict[key] = value[1:-1]