class_docstr: Test cases for stateful random-number generator operators.
class_docstr_tok: ["Test","cases","for","stateful","random-number","generator","operators","."]
docstr: Test for defun.
docstr_tok: ["Test","for","defun","."]
code: def testDefun(self, alg):
      """Test for defun."""
      with ops.device(xla_device_name()):
          gen = random.Generator.from_seed(seed=0, alg=alg)
  
          @def_function.function
          def f():
              x = gen.normal(shape=(3,))
              y = gen.uniform(
                  shape=(3,), minval=0, maxval=10, dtype=dtypes.uint32
              )
              z = gen.uniform_full_int(shape=(3,))
              return (x, y, z)
  
          f()
  
imports: import itertools
  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 errors_impl
  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 gen_stateful_random_ops
  from tensorflow.python.ops import random_ops_util
  from tensorflow.python.ops import stateful_random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import flags
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the StatefulRandomOpsTest obj's underlying member method code with example usage: obj.testDefun(alg) and returns: x,  y,  z