code: def testCreateLookupInDatasetFnUnderScope(self, source):
      # TODO(wxinyi): Warn the user of the inefficiency of this workflow (i.e.
      # creating `StaticHashTable` inside a `@tf.function`-wrapped `dataset_fn` to
      # be distributed with `distribute_datasets_from_function` and
      # `create_per_worker_dataset`.
      strategy = parameter_server_strategy_v2.ParameterServerStrategyV2(
          self.cluster_resolver
      )
  
      coordinator = coordinator_lib.ClusterCoordinator(
          strategy=strategy
      )
  
      with strategy.scope():
  
          def dataset_fn(input_context):
              some_out_of_range_tensor = constant_op.constant(
                  10, dtype=dtypes.int64
              )
              lookuptable = self.createStaticHashTable(
                  init_source=source, vals=[0, 1, 2], default_value=-2
              )
  
              self.assertNotIsInstance(
                  lookuptable, ps_values.DistributedTable
              )
  
              generation_tensor = lookuptable.lookup(
                  some_out_of_range_tensor
              )
              dataset = self.makeDatasetFromTensorWithoutUsingResource(
                  input_context, generation_tensor
              )
              return dataset
  
          @def_function.function
          def per_worker_dataset_fn():
              return strategy.distribute_datasets_from_function(
                  dataset_fn
              )
  
          per_worker_dataset = coordinator.create_per_worker_dataset(
              per_worker_dataset_fn
          )
          per_worker_iterator = iter(per_worker_dataset)
  
          @def_function.function
          def worker_fn(iterator):
              return math_ops.reduce_sum(next(iterator))
  
          result = []
          for _ in range(10):
              result.append(
                  coordinator.schedule(
                      worker_fn, args=(per_worker_iterator,)
                  )
              )
  
          for r in result:
              returned_input = r.fetch()
              self.assertAllClose(-48, returned_input)
  
imports: import copy
  import os
  from absl.testing import parameterized
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import device_util
  from tensorflow.python.distribute import multi_process_runner
  from tensorflow.python.distribute import multi_worker_test_base
  from tensorflow.python.distribute import parameter_server_strategy_v2
  from tensorflow.python.distribute import ps_values
  from tensorflow.python.distribute.coordinator import cluster_coordinator
  from tensorflow.python.distribute.coordinator import coordinator_context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.module import module
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
label_desc: Use image node_id 8 for calling the DistributedTableTest obj's underlying member method code with example usage: obj.testCreateLookupInDatasetFnUnderScope(source) and returns: dataset, strategy, math_ops