class_docstr: This is a registry class used to register classes and modules so that a universal
  object builder can be enabled.
  
  Args:
      name (str): The name of the registry .
      third_party_library (list, optional):
          List of third party libraries which are used in the initialization of the register module.
docstr: Registers a module represented in `module_class`.
  
  Args:
      module_class (class): The module to be registered.
  Returns:
      class: The module to be registered, so as to use it normally if via importing.
  Raises:
      AssertionError: Raises an AssertionError if the module has already been registered before.
docstr_tok: ["Registers","a","module","represented","in","`","module_class","`",".","Args",":","module_class","(","class",")",":","The","module","to","be","registered",".","Returns",":","class",":","The","module","to","be","registered",",","so","as","to","use","it","normally","if","via","importing",".","Raises",":","AssertionError",":","Raises","an","AssertionError","if","the","module","has","already","been","registered","before","."]
code: def register_module(self, module_class):
      """Registers a module represented in `module_class`.
  
      Args:
          module_class (class): The module to be registered.
      Returns:
          class: The module to be registered, so as to use it normally if via importing.
      Raises:
          AssertionError: Raises an AssertionError if the module has already been registered before.
      """
      module_name = module_class.__name__
      assert (
          module_name not in self._registry
      ), f"{module_name} not found in {self.name}"
      self._registry[module_name] = module_class
  
      # return so as to use it normally if via importing
      return module_class
  
file_path: colossalai/colossalai/legacy/registry/registry.py
imports: from types import ModuleType
  from typing import List
label_desc: Use image node_id 3 for calling the Registry obj's underlying member method code with example usage: obj.register_module(module_class) and returns: module_class