code: def testDeterminism(self, global_seed, local_seed):
      expect_determinism = (global_seed is not None) or (
          local_seed is not None
      )
  
      random_seed.set_random_seed(global_seed)
      ds = dataset_ops.Dataset.random(seed=local_seed).take(10)
  
      output_1 = self.getDatasetOutput(ds, requires_initialization=True)
      ds = self.graphRoundTrip(ds)
      output_2 = self.getDatasetOutput(ds, requires_initialization=True)
  
      if expect_determinism:
          self.assertEqual(output_1, output_2)
      else:
          # Technically not guaranteed since the two randomly-chosen int64 seeds
          # could match, but that is sufficiently unlikely (1/2^128 with perfect
          # random number generation).
          self.assertNotEqual(output_1, output_2)
  
imports: import warnings
  from absl.testing import parameterized
  from tensorflow.python import tf2
  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.eager import def_function
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import random_seed
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the RandomTest obj's underlying member method code with example usage: obj.testDeterminism(global_seed, local_seed) without return types