code: def read_hdf5_dict(h5f, names=None, path=None, on_missing='error', **kwargs):
      
      if path:
          h5f = h5f[path]
  
      # allow alternative keyword argument name (FIXME)
      if names is None:
          names = kwargs.pop('flags', None)
  
      # try and get list of names automatically
      if names is None:
          try:
              names = find_flag_groups(h5f, strict=True)
          except KeyError:
              names = None
          if not names:
              raise ValueError("Failed to automatically parse available flag "
                               "names from HDF5, please give a list of names "
                               "to read via the ``names=`` keyword")
  
      # read data
      out = DataQualityDict()
      for name in names:
          try:
              out[name] = read_hdf5_flag(h5f, name, **kwargs)
          except KeyError as exc:
              if on_missing == 'ignore':
                  pass
              elif on_missing == 'warn':
                  warnings.warn(str(exc))
              else:
                  raise ValueError('no H5Group found for flag '
                                   '{0!r}'.format(name))
  
      return out
docs: Read a `DataQualityDict` from an HDF5 file