class_docstr: A key/object registry class.
  This class is used in CVNets to do Dependency Injection in configs,
  so when you write "resnet" in a config, it knows which module to load.
  You can potentially provide a `base_class` to ensures that all items
  in the registry are of type `base_class`.
  
  Registry also allows for passing arguments to a registered item:
  For example: "top1" -> "top1(pred=logits)"
  
  Usage:
  >>> my_registry = Registry("registry_name")
  >>> @my_registry.register("awesome_class_or_func")
  ... def my_awesome_class_or_func():
  ...    pass
  >>> assert "awesome_class_or_func" in my_registry
  
  It allows for vanilla key/object definition as well as functional argument injection:
  >>> reg = Registry("registry_name")
  >>> reg.register("awesome_dict")(dict)
  >>> reg["awesome_dict(name=hello, type=fifo)]()
  {'name': 'hello', 'type': 'fifo'}
code: def __getitem__(
      self, key: Union[Tuple[str, str], str]
  ) -> RegistryItem:
      self._load_all()
  
      type_ = None
      if isinstance(key, Tuple) and len(key) == 2:
          key, type_ = key
  
      assert isinstance(
          key, str
      ), f"Key should be an instance of string. Got {type(key)}"
      name, params = self.parse_key(key)
      if type_:
          name = f"{type_}{self.separator}{name}"
  
      if name not in self.registry:
          registry_keys = list(self.registry.keys())
          temp_str = (
              f"\n{name} not yet supported in {self.registry_name} registry."
              f"\nSupported values are:"
          )
          for i, supp_val in enumerate(registry_keys):
              temp_str += f"\n\t {i}: {supp_val}"
          logger.error(temp_str + "\n")
  
      reg_item = self.registry[name]
  
      if params:
          reg_item = partial(reg_item, **params)
      return reg_item
  
file_path: ml-cvnets/utils/registry.py
imports: import argparse
  from functools import partial
  from typing import Callable, Dict, Iterable, List, Optional, Sequence, Tuple, TypeVar, Union
  from utils import logger
  from utils.import_utils import import_modules_from_folder
label_desc: Use image node_id 6 for calling the Registry obj's underlying member method code with example usage: obj.__getitem__(key) and returns: reg_item