code: def create_rnn_cell(
      cell_type, state_size, default_initializer, reuse=None
  ):
      if cell_type == "GRU":
          return tf.nn.rnn_cell.GRUCell(
              state_size, activation=tf.nn.tanh, reuse=reuse
          )
      elif cell_type == "LSTM":
          return tf.nn.rnn_cell.LSTMCell(
              state_size,
              initializer=default_initializer,
              activation=tf.nn.tanh,
              reuse=reuse,
          )
      else:
          return tf.nn.rnn_cell.BasicRNNCell(
              state_size, activation=tf.nn.tanh, reuse=reuse
          )
  
file_path: cornac/cornac/models/beacon/beacon_tf.py
imports: import numpy
  import warnings
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: create_rnn_cell(cell_type, state_size, default_initializer, reuse) and returns: tf, tf, tf