class_docstr: Tests reading from local workers if `target_workers` is `local`.
class_docstr_tok: ["Tests","reading","from","local","workers","if","`","target_workers","`","is","`","local","`","."]
code: def testOneLocalWorker(self):
      cluster = multi_process_cluster.MultiProcessCluster(
          num_local_workers=1, num_remote_workers=5
      )
      num_elements = 10
      ds = self.make_distributed_range_dataset(
          num_elements, cluster, target_workers="local"
      )
      self.assertDatasetProduces(ds, list(range(num_elements)))
  
imports: import multiprocessing
  from absl.testing import parameterized
  from tensorflow.python.data.experimental.kernel_tests.service import multi_process_cluster
  from tensorflow.python.data.experimental.kernel_tests.service import test_base
  from tensorflow.python.data.experimental.ops import data_service_ops
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
label_desc: Use image node_id 1 for calling the LocalWorkersTest obj's underlying member method code with example usage: obj.testOneLocalWorker() without return types