code: def reg_to_tf_instance(layer_type) -> FunctionType:
      """function decorator that registers layer implementation
      :return: decorated function
      """
  
      def reg_impl_decorator(func):
          assert layer_type not in tf_layer_dict
          tf_layer_dict[layer_type] = func
          return func
  
      return reg_impl_decorator
  
imports: import math
  from types import FunctionType
  import tensorflow
  from rl_coach.architectures import layers
  from rl_coach.architectures.tensorflow_components import utils
label_desc: Use image node_id 2 for calling a global function with example usage: reg_to_tf_instance(layer_type) and returns: reg_impl_decorator, func