code: def register_layer(name, external_params=None, class_params=None):
      """Register the scoring function using this decorator.
  
      Parameters
      -----------
      name: str
          Name of the scoring function to be used to register the class.
      external_params: list of strings
          If there are any scoring function hyperparams, register their names.
      class_params: dict
          Parameters that may be used internally across various models.
      """
      if external_params is None:
          external_params = []
      if class_params is None:
          class_params = {}
  
      def insert_in_registry(class_handle):
          assert (
              name not in SCORING_LAYER_REGISTRY.keys()
          ), "Scoring Layer with name {} \
          already exists!".format(
              name
          )
  
          # store the class handle in the registry with name as key
          SCORING_LAYER_REGISTRY[name] = class_handle
          # create a class level variable and store the name
          class_handle.name = name
  
          # store other params related to the scoring function in the registry
          # this will be used later during model selection, etc
          SCORING_LAYER_REGISTRY[name].external_params = external_params
          SCORING_LAYER_REGISTRY[name].class_params = class_params
          return class_handle
  
      return insert_in_registry
  
file_path: AmpliGraph/ampligraph/latent_features/layers/scoring/AbstractScoringLayer.py
imports: import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: register_layer(name, external_params, class_params) and returns: insert_in_registry, class_handle