class_docstr: The registry that provides name -> object mapping, to support third-party users' custom modules.
  To create a registry (inside segmentron):
  .. code-block:: python
      BACKBONE_REGISTRY = Registry('BACKBONE')
  To register an object:
  .. code-block:: python
      @BACKBONE_REGISTRY.register()
      class MyBackbone():
          ...
  Or:
  .. code-block:: python
      BACKBONE_REGISTRY.register(MyBackbone)
docstr: Register the given object under the the name `obj.__name__`.
  Can be used as either a decorator or not. See docstring of this class for usage.
docstr_tok: ["Register","the","given","object","under","the","the","name","`","obj.__name__","`",".","Can","be","used","as","either","a","decorator","or","not",".","See","docstring","of","this","class","for","usage","."]
code: def register(self, obj=None, name=None):
      """
      Register the given object under the the name `obj.__name__`.
      Can be used as either a decorator or not. See docstring of this class for usage.
      """
      if obj is None:
          # used as a decorator
          def deco(func_or_class, name=name):
              if name is None:
                  name = func_or_class.__name__
              self._do_register(name, func_or_class)
              return func_or_class
  
          return deco
  
      # used as a function call
      if name is None:
          name = obj.__name__
      self._do_register(name, obj)
  
imports: import functools
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 3 for calling the Registry obj's underlying member method code with example usage: obj.register(obj, name) and returns: deco, func_or_class