code: def test_map_variable(self):
      ds = dataset_ops.Dataset.range(100)
      captured_var = variables.Variable(0)
  
      def func(_):
          return captured_var.assign_add(1)
  
      ds = ds.map(func)
      ds = ds.enumerate(start=1)
      init = lookup_ops.DatasetInitializer(ds)
      table = self.getHashTable()(init, default_value=-1)
      self.evaluate(captured_var.initializer)
      self.initialize_table(table)
  
      output = table.lookup(
          constant_op.constant([1, 2, 101], dtypes.int64)
      )
      result = self.evaluate(output)
      self.assertAllEqual([1, 2, -1], result)
  
imports: import os
  from tensorflow.python import tf2
  from tensorflow.python.data.experimental.ops import lookup_ops
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import readers
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the DatasetInitializerTest obj's underlying member method code with example usage: obj.test_map_variable() and returns: captured_var