code: def cdna_transformation(
      prev_image,
      cdna_input,
      num_masks,
      color_channels,
      dna_kernel_size,
      relu_shift,
  ):
      """Apply convolutional dynamic neural advection to previous image.
  
      Args:
        prev_image: previous image to be transformed.
        cdna_input: hidden lyaer to be used for computing CDNA kernels.
        num_masks: number of masks and hence the number of CDNA transformations.
        color_channels: the number of color channels in the images.
        dna_kernel_size: dna kernel size.
        relu_shift: shift for ReLU function.
      Returns:
        List of images transformed by the predicted CDNA kernels.
      """
      batch_size = tf.shape(cdna_input)[0]
      height = int(prev_image.get_shape()[1])
      width = int(prev_image.get_shape()[2])
  
      # Predict kernels using linear function of last hidden layer.
      cdna_kerns = tfl.dense(
          cdna_input,
          dna_kernel_size * dna_kernel_size * num_masks,
          name="cdna_params",
          activation=None,
      )
  
      # Reshape and normalize.
      cdna_kerns = tf.reshape(
          cdna_kerns,
          [batch_size, dna_kernel_size, dna_kernel_size, 1, num_masks],
      )
      cdna_kerns = tf.nn.relu(cdna_kerns - relu_shift) + relu_shift
      norm_factor = tf.reduce_sum(cdna_kerns, [1, 2, 3], keep_dims=True)
      cdna_kerns /= norm_factor
  
      # Treat the color channel dimension as the batch dimension since the same
      # transformation is applied to each color channel.
      # Treat the batch dimension as the channel dimension so that
      # depthwise_conv2d can apply a different transformation to each sample.
      cdna_kerns = tf.transpose(cdna_kerns, [1, 2, 0, 4, 3])
      cdna_kerns = tf.reshape(
          cdna_kerns,
          [dna_kernel_size, dna_kernel_size, batch_size, num_masks],
      )
      # Swap the batch and channel dimensions.
      prev_image = tf.transpose(prev_image, [3, 1, 2, 0])
  
      # Transform image.
      transformed = tf.nn.depthwise_conv2d(
          prev_image, cdna_kerns, [1, 1, 1, 1], "SAME"
      )
  
      # Transpose the dimensions to where they belong.
      transformed = tf.reshape(
          transformed,
          [color_channels, height, width, batch_size, num_masks],
      )
      transformed = tf.transpose(transformed, [3, 1, 2, 0, 4])
      transformed = tf.unstack(transformed, axis=-1)
      return transformed
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.python.ops import summary_op_util
label_desc: Use image node_id 11 for calling a global function with example usage: cdna_transformation(prev_image, cdna_input, num_masks, color_channels, dna_kernel_size, relu_shift) and returns: transformed