class_docstr: This is an adaptor to time-reverse a FusedRNNCell.
  
  For example,
  
  ```python
  cell = tf.compat.v1.nn.rnn_cell.BasicRNNCell(10)
  fw_lstm = tf.contrib.rnn.FusedRNNCellAdaptor(cell, use_dynamic_rnn=True)
  bw_lstm = tf.contrib.rnn.TimeReversedFusedRNN(fw_lstm)
  fw_out, fw_state = fw_lstm(inputs)
  bw_out, bw_state = bw_lstm(inputs)
  ```
class_docstr_tok: ["This","is","an","adaptor","to","time-reverse","a","FusedRNNCell",".","For","example",",","``","`","python","cell","=","tf.compat.v1.nn.rnn_cell.BasicRNNCell","(","10",")","fw_lstm","=","tf.contrib.rnn.FusedRNNCellAdaptor","(","cell",",","use_dynamic_rnn=True",")","bw_lstm","=","tf.contrib.rnn.TimeReversedFusedRNN","(","fw_lstm",")","fw_out",",","fw_state","=","fw_lstm","(","inputs",")","bw_out",",","bw_state","=","bw_lstm","(","inputs",")","``","`"]
docstr: Time reverse the provided tensor or list of tensors.
  
  Assumes the top dimension is the time dimension.
  
  Args:
    t: 3D tensor or list of 2D tensors to be reversed
    lengths: 1D tensor of lengths, or `None`
  
  Returns:
    A reversed tensor or list of tensors
docstr_tok: ["Time","reverse","the","provided","tensor","or","list","of","tensors",".","Assumes","the","top","dimension","is","the","time","dimension",".","Args",":","t",":","3D","tensor","or","list","of","2D","tensors","to","be","reversed","lengths",":","1D","tensor","of","lengths",",","or","`","None","`","Returns",":","A","reversed","tensor","or","list","of","tensors"]
code: def _reverse(self, t, lengths):
      """Time reverse the provided tensor or list of tensors.
  
      Assumes the top dimension is the time dimension.
  
      Args:
        t: 3D tensor or list of 2D tensors to be reversed
        lengths: 1D tensor of lengths, or `None`
  
      Returns:
        A reversed tensor or list of tensors
      """
      if isinstance(t, list):
          return list(reversed(t))
      else:
          if lengths is None:
              return array_ops.reverse_v2(t, [0])
          else:
              return array_ops.reverse_sequence(t, lengths, 0, 1)
  
file_path: spark-nlp/python/sparknlp/training/_tf_graph_builders/tf2contrib/fused_rnn_cell.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import rnn
label_desc: Use image node_id 2 for calling the TimeReversedFusedRNN obj's underlying member method code with example usage: obj._reverse(t, lengths) and returns: list, array_ops, array_ops