class_docstr: A registry to map strings to classes.
  
  Registered object could be built from registry.
  Example:
      >>> MODELS = Registry('models')
      >>> @MODELS.register_module()
      >>> class ResNet:
      >>>     pass
      >>> resnet = MODELS.build(dict(type='ResNet'))
  
  Please refer to
  https://mmcv.readthedocs.io/en/latest/understand_mmcv/registry.html for
  advanced usage.
  
  Args:
      name (str): Registry name.
      build_func(func, optional): Build function to construct instance from
          Registry, func:`build_from_cfg` is used if neither ``parent`` or
          ``build_func`` is specified. If ``parent`` is specified and
          ``build_func`` is not given,  ``build_func`` will be inherited
          from ``parent``. Default: None.
      parent (Registry, optional): Parent registry. The class registered in
          children registry could be built from parent. Default: None.
      scope (str, optional): The scope of registry. It is the key to search
          for children registry. If not specified, scope will be the name of
          the package where class is defined, e.g. mmdet, mmcls, mmseg.
          Default: None.
code: def _register_module(
      self, module_class, module_name=None, force=False
  ):
      if not inspect.isclass(module_class):
          raise TypeError(
              "module must be a class, " f"but got {type(module_class)}"
          )
  
      if module_name is None:
          module_name = module_class.__name__
      if isinstance(module_name, str):
          module_name = [module_name]
      for name in module_name:
          if not force and name in self._module_dict:
              raise KeyError(
                  f"{name} is already registered " f"in {self.name}"
              )
          self._module_dict[name] = module_class
  
imports: import inspect
  import warnings
  from functools import partial
  from .misc import is_seq_of
label_desc: Use image node_id 14 for calling the Registry obj's underlying member method code with example usage: obj._register_module(module_class, module_name, force) without return types