docs: def _data_format_resolver(data_format, resolver_dict):
      """Resolve a value from :attr:`resolver_dict` based on the
      :attr:`data_format`.
  
      Args:
          data_format (:class:`~.DataFormat` or str): The data format;
              must be a member of :class:`~.DataFormat` or a string
              equivalent.
          resolver_dict (dict): the resolving dict. Can hold any value
              for any of the valid :attr:`data_format` strings
  
      Returns:
          The value of the key in :attr:`resolver_dict` that matches
          :attr:`data_format`
      """
      try:
          data_format = DataFormat(data_format)
      except ValueError:
          supported_formats = ', '.join(
              ["'{}'".format(f.value) for f in DataFormat])
          raise ValueError(("'data_format' must be one of {formats}. Given "
                            "'{value}'.").format(formats=supported_formats,
                                                 value=data_format))
      return (resolver_dict.get(data_format) or
              resolver_dict.get(data_format.value))