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'}
docstr: Iterates through all items and fetches their arguments.
  
  Note: make sure that all items are already registered before calling this method.
docstr_tok: ["Iterates","through","all","items","and","fetches","their","arguments",".","Note",":","make","sure","that","all","items","are","already","registered","before","calling","this","method","."]
code: def all_arguments(
      self, parser: argparse.ArgumentParser
  ) -> argparse.ArgumentParser:
      """
      Iterates through all items and fetches their arguments.
  
      Note: make sure that all items are already registered before calling this method.
      """
      self._load_all()
      self.arguments_accessed = True
  
      for _, item in self.items():
          parser = item.add_arguments(parser)
  
      return parser
  
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 9 for calling the Registry obj's underlying member method code with example usage: obj.all_arguments(parser) and returns: parser