code: def _test_determinism(self, case, seed_type):
      # Stateless values should be equal iff the seeds are equal (roughly)
      seeds = [
          (x, y) for x in range(5) for y in range(5)
      ] * 3  # pylint: disable=g-complex-comprehension
      with self.test_session(), ops.device(get_device().name):
          _, stateless_op, _ = case
          if context.executing_eagerly():
              values = [
                  (
                      seed,
                      stateless_op(
                          seed=constant_op.constant(seed, seed_type)
                      ),
                  )
                  for seed in seeds
              ]
          else:
              # Have this branch because the above branch is too slow in graph
              # mode
              seed_t = array_ops.placeholder(seed_type, shape=[2])
              pure = stateless_op(seed=seed_t)
              values = [
                  (seed, pure.eval(feed_dict={seed_t: seed}))
                  for seed in seeds
              ]
          for s0, v0 in values:
              for s1, v1 in values:
                  if dtypes.as_dtype(v0.dtype) != dtypes.bfloat16:
                      self.assertEqual(s0 == s1, np.all(v0 == v1))
                  elif s0 == s1:
                      # Skip the s0 != s1 case because v0 and v1 can be either equal or
                      # unequal in that case due to bfloat16's low precision
                      self.assertAllEqual(v0, v1)
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.compat import compat
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import gen_stateless_random_ops_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the StatelessOpsTest obj's underlying member method code with example usage: obj._test_determinism(case, seed_type) without return types