code: def residual_shuffle_network(inputs, hparams):
      """Residual Shuffle-Exchange network with weight sharing.
  
      Args:
        inputs: inputs to the Shuffle-Exchange network. Should be in length of power
          of 2.
        hparams: Model configuration
  
      Returns:
        tf.Tensor: Outputs of the Shuffle-Exchange last layer
      """
      input_shape = tf.shape(inputs)
      n_bits = tf.log(tf.cast(input_shape[1] - 1, tf.float32)) / tf.log(
          2.0
      )
      n_bits = tf.cast(n_bits, tf.int32) + 1
  
      block_out = inputs
  
      for k in range(hparams.num_hidden_layers):
          with tf.variable_scope(
              "benes_block_" + str(k), reuse=tf.AUTO_REUSE
          ):
              forward_output = forward_part(block_out, hparams, n_bits)
              block_out = reverse_part(forward_output, hparams, n_bits)
  
      return RSU("last_layer", hparams.dropout, hparams.mode)(block_out)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers.common_layers import gelu
  from tensor2tensor.models.research.shuffle_network import reverse_shuffle_layer
  from tensor2tensor.models.research.shuffle_network import shuffle_layer
  from tensor2tensor.models.research.shuffle_network import ShuffleNetwork
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling a global function with example usage: residual_shuffle_network(inputs, hparams) and returns: RSU