code: def testDeterminism(self, local_determinism, global_determinism):
      num_elements = 1000
      batches = []
      for i in range(num_elements):
          example_i = example(
              features=features(
                  {
                      "a": int64_feature([i]),
                  }
              )
          )
          batches.append([example_i.SerializeToString()])
  
      test_features = {
          "a": parsing_ops.FixedLenFeature((), dtype=dtypes.int64)
      }
      dataset = dataset_ops.Dataset.from_tensor_slices(batches)
      dataset = dataset.apply(
          contrib_parsing_ops.parse_example_dataset(
              test_features,
              num_parallel_calls=10,
              deterministic=local_determinism,
          )
      )
  
      opts = options_lib.Options()
      opts.deterministic = global_determinism
      dataset = dataset.with_options(opts)
  
      expected = list(range(num_elements))
      actual = [elem["a"][0] for elem in self.getDatasetOutput(dataset)]
  
      require_order = local_determinism or (
          local_determinism is None and global_determinism
      )
      if require_order:
          self.assertAllEqual(expected, actual)
      else:
          self.assertCountEqual(expected, actual)
  
imports: import copy
  from absl.testing import parameterized
  import numpy
  from tensorflow.core.example import example_pb2
  from tensorflow.core.example import feature_pb2
  from tensorflow.python.data.experimental.ops import parsing_ops
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.kernel_tests import tf_record_test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.eager import context
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import parsing_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 23 for calling the ParseExampleDatasetTest obj's underlying member method code with example usage: obj.testDeterminism(local_determinism, global_determinism) without return types