class_docstr: This class performs the mapping between the objects contained
  in a HDF5 group and Dataset attributes.
class_docstr_tok: ["This","class","performs","the","mapping","between","the","objects","contained","in","a","HDF5","group","and","Dataset","attributes","."]
code: def __getitem__(self, key: str) -> DatasetAttribute:
      if key in self._cache:
          return self._cache[key]
  
      h5_obj = self.bind[key]
  
      attr_type = get_attribute_type(h5_obj)
      attr = attr_type(bind=h5_obj)
      self._cache[key] = attr
  
      return attr
  
imports: import typing
  from collections.abc import MutableMapping
  from types import MappingProxyType
  from typing import Any, Dict, Optional, Type
  from pennylane.data.base.attribute import AttributeInfo, DatasetAttribute, get_attribute_type, match_obj_type
  from pennylane.data.base.hdf5 import HDF5Any, HDF5Group
label_desc: Use image node_id 2 for calling the AttributeTypeMapper obj's underlying member method code with example usage: obj.__getitem__(key) and returns: attr, self