code: def _testReverseSequence(
      self,
      x,
      batch_axis,
      seq_axis,
      seq_lengths,
      truth,
      expected_err_re=None,
  ):
      with self.session():
          p = array_ops.placeholder(dtypes.as_dtype(x.dtype))
          lengths = array_ops.placeholder(
              dtypes.as_dtype(seq_lengths.dtype)
          )
          with self.test_scope():
              ans = array_ops.reverse_sequence(
                  p,
                  batch_axis=batch_axis,
                  seq_axis=seq_axis,
                  seq_lengths=lengths,
              )
          if expected_err_re is None:
              tf_ans = ans.eval(feed_dict={p: x, lengths: seq_lengths})
              self.assertAllClose(tf_ans, truth, atol=1e-10)
          else:
              with self.assertRaisesOpError(expected_err_re):
                  ans.eval(feed_dict={p: x, lengths: seq_lengths})
  
file_path: tensorflow/tensorflow/compiler/tests/reverse_sequence_op_test.py
imports: import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the ReverseSequenceTest obj's underlying member method code with example usage: obj._testReverseSequence(x, batch_axis, seq_axis, seq_lengths, truth, expected_err_re) without return types