code: def _register(name, func):
      if name in _LAYER_REGISTRY:
          _LAYER_REGISTRY[name] = _NameConflict
          return
      if name in ["tf"]:
          raise ValueError(
              logger.error("A layer cannot be named {}".format(name))
          )
      _LAYER_REGISTRY[name] = func
  
      # handle alias
      if name == "Conv2DTranspose":
          _register("Deconv2D", func)
  
file_path: tensorpack/tensorpack/models/registry.py
imports: import copy
  import re
  import collections
  from functools import wraps
  import six
  import tensorflow
  from ..compat import tfv1
  from ..tfutils.argscope import get_arg_scope
  from ..tfutils.model_utils import get_shape_str
  from ..utils import logger
label_desc: Use image node_id 1 for calling a global function with example usage: _register(name, func) without return types