class_docstr: Test cases for stateless random-number generator operators.
class_docstr_tok: ["Test","cases","for","stateless","random-number","generator","operators","."]
docstr: Tests all values of `alg`.
docstr_tok: ["Tests","all","values","of","`","alg","`","."]
code: def testAlg(self, op, alg_group):
      """Tests all values of `alg`."""
      if config.list_logical_devices(
          "TPU"
      ) or config.list_logical_devices("GPU"):
          self.skipTest(
              "Only _cpu tests linked in support for jit_compile on CPU."
          )
      seed = [1, 2]
      shape = [2, 3]
      outputs = []
      for alg in alg_group:
          with ops.device("CPU"):
              output = def_function.function(jit_compile=True)(op)(
                  shape=shape, seed=seed, alg=alg
              )
          self.assertEqual(output.shape, shape)
          outputs.append(output)
      x = outputs[0]
      for y in outputs[1:]:
          self.assertAllEqual(x, y)
  
imports: import functools
  import os
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.client import device_lib
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.random import util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_stateless_random_ops_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops_util
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the StatelessRandomOpsTest obj's underlying member method code with example usage: obj.testAlg(op, alg_group) without return types