code: def __getitem__(self, key):
      if key is None or key == self.__class__._SINGLETON:
          assert self.is_singleton()
          return super().__getitem__(self.__class__._SINGLETON)
  
      elif isinstance(key, (int, slice)):
          return self.fmap(function=(lambda x: x[key]))
  
      elif isinstance(key, (list, tuple)):
          return self.__class__(((name, self[name]) for name in key))
  
      elif not isinstance(key, str):
          raise TensorforceError.type(
              name="NestedDict", argument="key", dtype=type(key)
          )
  
      elif key.startswith(self.__class__._SINGLETON + "/"):
          raise TensorforceError.value(
              name="NestedDict", argument="key", value=key
          )
  
      elif self.is_singleton():
          return self.singleton()[key]
  
      elif "/" in key:
          key, subkey = key.split("/", 1)
          value = super().__getitem__(key)
          assert isinstance(value, self.__class__)
          return value[subkey]
  
      else:
          return super().__getitem__(key)
  
imports: from collections import OrderedDict
  from tensorforce import TensorforceError
label_desc: Use image node_id 14 for calling the NestedDict obj's underlying member method code with example usage: obj.__getitem__(key) and returns: super, self, self, self, value, super