code: def collect(
      self,
      path: Union[AimObjectKey, AimObjectPath] = (),
      strict: bool = True,
      resolve_objects: bool = False,
  ) -> AimObject:
      if not strict:
          raise NotImplementedError(
              "Non-strict mode is not supported yet."
          )
  
      if path == Ellipsis:
          path = ()
  
      if isinstance(path, (int, str)):
          path = (path,)
  
      container = self.container
      for key in path:
          container = container[key]
  
      return deepcopy(container)
  
imports: from copy import deepcopy
  from aim.storage.types import CustomObjectBase
  from aim.storage.types import AimObject, AimObjectKey, AimObjectPath
  from aim.storage.treearrayview import TreeArrayView
  from aim.storage.treeview import TreeView
  from typing import Any, Iterator, Tuple, Union
label_desc: Use image node_id 4 for calling the InMemoryTreeView obj's underlying member method code with example usage: obj.collect(path, strict, resolve_objects) and returns: deepcopy