code: def register_base(
      mapping: Dict[str, Any], key: str, module: Any = None
  ) -> Union[None, Callable]:
      r"""Base function for registering a module in GraphGym.
  
      Args:
          mapping (dict): Python dictionary to register the module.
              hosting all the registered modules
          key (string): The name of the module.
          module (any, optional): The module. If set to :obj:`None`, will return
              a decorator to register a module.
      """
      if module is not None:
          if key in mapping:
              raise KeyError(f"Module with '{key}' already defined")
          mapping[key] = module
          return
  
      # Other-wise, use it as a decorator:
      def bounded_register(module):
          register_base(mapping, key, module)
          return module
  
      return bounded_register
  
imports: import warnings
  from typing import Any, Callable, Dict, Union
label_desc: Use image node_id 1 for calling a global function with example usage: register_base(mapping, key, module) and returns: bounded_register, module