code: def custom_layer(incoming, custom_fn, **kwargs):
      """Custom Layer.
  
      A custom layer that can apply any operations to the incoming Tensor or
      list of `Tensor`. The custom function can be pass as a parameter along
      with its parameters.
  
      Arguments:
          incoming : A `Tensor` or list of `Tensor`. Incoming tensor.
          custom_fn : A custom `function`, to apply some ops on incoming tensor.
          **kwargs: Some custom parameters that custom function might need.
  
      """
      name = "CustomLayer"
      if "name" in kwargs:
          name = kwargs["name"]
      with tf.name_scope(name):
          inference = custom_fn(incoming, **kwargs)
  
      return inference
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import tensorflow.compat.v1
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import standard_ops
  import tflearn
  from tflearn import utils
  from tflearn import variables
  from tflearn import activations
  from tflearn import initializations
  from tflearn import regularizers
label_desc: Use image node_id 4 for calling a global function with example usage: custom_layer(incoming, custom_fn) and returns: inference