code: def decode_numpy_dict_values(attrs: Mapping[K, V]) -> Dict[K, V]:
      
      attrs = dict(attrs)
      for k, v in attrs.items():
          if isinstance(v, np.ndarray):
              attrs[k] = v.tolist()
          elif isinstance(v, np.generic):
              attrs[k] = v.item()
      return attrs
docs: Convert attribute values from numpy objects to native Python objects,
      for use in to_dict