class_docstr: Small class for inspecting a HDF5 file and retrieve its metadata/header data.
class_docstr_tok: ["Small","class","for","inspecting","a","HDF5","file","and","retrieve","its","metadata\/header","data","."]
code: def _collect_attrs(self, name, attrs):
      attrs_cache = self._attrs_cache.setdefault(name, {})
      for key, value in attrs.items():
          value = np.squeeze(value)
          fc_key = "{}/attr/{}".format(name, key)
          try:
              value = np2str(value)
          except ValueError:
              # use the original value
              pass
          except AttributeError:
              # A HDF5 reference ?
              value = self.get_reference(name, key)
              if value is None:
                  LOG.warning(
                      "Value cannot be converted - skip setting attribute %s",
                      fc_key,
                  )
                  continue
          self.file_content[fc_key] = attrs_cache[key] = value
  
file_path: satpy/satpy/readers/hdf5_utils.py
imports: import logging
  import dask.array
  import h5py
  import numpy
  import xarray
  from satpy.readers import open_file_or_filename
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.readers.utils import np2str
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 2 for calling the HDF5FileHandler obj's underlying member method code with example usage: obj._collect_attrs(name, attrs) without return types