code: def testFibonacci(self):
      data = (
          dataset_ops.Dataset.from_tensors(1)
          .repeat(None)
          .scan(
              initial_state=[0, 1],
              scan_func=lambda a, _: ([a[1], a[0] + a[1]], a[1]),
          )
      )
      next_element = self.getNext(data)
  
      self.assertEqual(1, self.evaluate(next_element()))
      self.assertEqual(1, self.evaluate(next_element()))
      self.assertEqual(2, self.evaluate(next_element()))
      self.assertEqual(3, self.evaluate(next_element()))
      self.assertEqual(5, self.evaluate(next_element()))
      self.assertEqual(8, self.evaluate(next_element()))
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.data.ops import scan_op
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_v2_toggles
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops import tensor_array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the ScanTest obj's underlying member method code with example usage: obj.testFibonacci() without return types