code: def rnn(
      input_states,
      sequence_lengths,
      dropout_rate,
      is_training,
      num_units,
  ):
      layer_cnt = 1
      states = []
      xs = tf.transpose(input_states, perm=[1, 0, 2])
      for i in range(0, layer_cnt):
          xs = dropout(xs, dropout_rate, is_training)
          with tf.variable_scope("layer_" + str(i)):
              cell_fw = XGRUCell(num_units)
              cell_bw = XGRUCell(num_units)
              outputs, _ = tf.nn.bidirectional_dynamic_rnn(
                  cell_fw=cell_fw,
                  cell_bw=cell_bw,
                  dtype=tf.float32,
                  sequence_length=sequence_lengths,
                  inputs=xs,
                  time_major=True,
              )
  
          y_lr, y_rl = outputs
          xs = tf.concat([y_lr, y_rl], 2)
          states.append(xs)
  
      return tf.transpose(
          dropout(tf.concat(states, axis=2), dropout_rate, is_training),
          perm=[1, 0, 2],
      )
  
file_path: nni/examples/trials/weight_sharing/ga_squad/graph_to_tf.py
imports: import tensorflow
  from rnn import XGRUCell
  from util import dropout
  from graph import LayerType
label_desc: Use image node_id 5 for calling a global function with example usage: rnn(input_states, sequence_lengths, dropout_rate, is_training, num_units) and returns: tf