code: def testScan(self):
      with ops.device(
          "/GPU:0" if test.is_gpu_available() else "/CPU:0"
      ):
          out = ctc_ops._scan(
              lambda accum, elem: accum + elem,
              constant_op.constant([1.0, 2.0, 3.0]),
              23.0,
          )
          self.assertAllEqual([24.0, 26.0, 29.0], out)
  
          out = ctc_ops._scan(
              lambda a, e: a + e,
              constant_op.constant([1.0, 2.0, 3.0]),
              23.0,
              inclusive=True,
          )
          self.assertAllEqual([23.0, 24.0, 26.0, 29.0], out)
  
          out = ctc_ops._scan(
              lambda a, e: a + e,
              constant_op.constant([1.0, 2.0, 3.0]),
              23.0,
              reverse=True,
          )
          self.assertAllEqual([29.0, 28.0, 26.0], out)
  
          out = ctc_ops._scan(
              lambda a, e: a + e,
              constant_op.constant([1.0, 2.0, 3.0]),
              23.0,
              reverse=True,
              inclusive=True,
          )
          self.assertAllEqual([29.0, 28.0, 26.0, 23.0], out)
  
          out = ctc_ops._scan(
              lambda a, e: a + e,
              constant_op.constant(
                  [[0.0, 1.0], [2.0, 3.0], [4.0, 5.0]]
              ),
              constant_op.constant([23.0, 24.0]),
          )
          self.assertAllEqual(
              [[23.0, 25.0], [25.0, 28.0], [29.0, 33.0]], out
          )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import ctc_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 19 for calling the CTCLossTestV2 obj's underlying member method code with example usage: obj.testScan() without return types