code: def testBatchedBroadcastSeedAndMaxval(
      self, seed, seed_dtype, max_index, index_dtype
  ):
      seed = math_ops.cast(seed, seed_dtype)
      index = math_ops.cast(range(max_index + 1), index_dtype)
      new_index = stateless.index_shuffle(
          index, seed, max_index=max_index
      )
      self.assertEqual(new_index.dtype, index_dtype)
      new_index = self.evaluate(new_index)
      self.assertAllGreaterEqual(new_index, 0)
      self.assertAllLessEqual(new_index, max_index)
      self.assertLen(new_index, max_index + 1)
      self.assertLen(set(new_index), max_index + 1)
  
file_path: tensorflow/tensorflow/python/kernel_tests/random/random_index_shuffle_test.py
imports: import itertools
  from absl.testing import parameterized
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_random_index_shuffle_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the StatelessOpsTest obj's underlying member method code with example usage: obj.testBatchedBroadcastSeedAndMaxval(seed, seed_dtype, max_index, index_dtype) without return types