code: def make_lambda_layer_class(fn):
      """Creates a `LambdaLayer` class.
  
      Args:
        fn: A callable.
  
      Returns:
        lambda_layer_class: A new `LambdaLayer` class that closes over `fn`.
      """
  
      # TODO(siege): We do this rather than storing parameters explicitly inside the
      # class because we want to avoid having to use a CompositeTensor-like
      # functionality, as that requires annotating a large porting of TFP with
      # expand_composites=True. This isn't worth doing for this experimental
      # library.
  
      class LambdaLayer(
          collections.namedtuple("LambdaLayer", ["dummy_value"])
      ):
          """Lambda layer.
  
          This layer applies a callable over its input.
          """
  
          @property
          def fn(self):
              return fn
  
          def __call__(self, *args, **kwargs):
              return self.fn(*args, **kwargs)
  
      return LambdaLayer
  
imports: import collections
  import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import deterministic
  from tensorflow_probability.python.distributions import joint_distribution_coroutine
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.internal import vectorization_util
label_desc: Use image node_id 4 for calling a global function with example usage: make_lambda_layer_class(fn) and returns: LambdaLayer, fn, self