class_docstr: Create the registry that will map name to object.
  This facilitates the users to create custom registry.
docstr: Register the given object under either the nickname or `obj.__name__`. It can be used as
   either a decorator or not. See docstring of this class for usage.
docstr_tok: ["Register","the","given","object","under","either","the","nickname","or","`","obj.__name__","`",".","It","can","be","used","as","either","a","decorator","or","not",".","See","docstring","of","this","class","for","usage","."]
code: def register(self, *args):
      """
      Register the given object under either the nickname or `obj.__name__`. It can be used as
       either a decorator or not. See docstring of this class for usage.
      """
      if len(args) == 2:
          # Register an object with nick name by function call
          nickname, obj = args
          self._do_register(nickname, obj)
      elif len(args) == 1:
          if isinstance(args[0], str):
              # Register an object with nick name by decorator
              nickname = args[0]
  
              def deco(func_or_class: object) -> object:
                  self._do_register(nickname, func_or_class)
                  return func_or_class
  
              return deco
          else:
              # Register an object by function call
              self._do_register(args[0].__name__, args[0])
      elif len(args) == 0:
          # Register an object by decorator
          def deco(func_or_class: object) -> object:
              self._do_register(func_or_class.__name__, func_or_class)
              return func_or_class
  
          return deco
      else:
          raise ValueError("Do not support the usage!")
  
file_path: autogluon/multimodal/src/autogluon/multimodal/registry.py
imports: import json
  from collections import OrderedDict
  from json import JSONDecodeError
  from typing import List
  from typing import OrderedDict
label_desc: Use image node_id 4 for calling the Registry obj's underlying member method code with example usage: obj.register() and returns: deco, deco, func_or_class, func_or_class