docstr: Use Pearson's Chi-squared test to test for uniformity.
code: def testDistributionOfUniform(self, dtype):
      """Use Pearson's Chi-squared test to test for uniformity."""
      if dtype == dtypes.bfloat16 and not test_util.is_gpu_available(
          cuda_only=True, min_cuda_compute_capability=(8, 0)
      ):
          self.skipTest("Bfloat16 requires compute capability 8.0")
      n = 1000
      seed = 123
      gen = random.Generator.from_seed(seed)
      maxval = 1
      if dtype.is_integer:
          maxval = 100
      x = gen.uniform(shape=[n], maxval=maxval, dtype=dtype).numpy()
      if maxval > 1:
          # Normalize y to range [0, 1).
          x = x.astype(float) / maxval
      # Tests that the values are distributed amongst 10 bins with equal
      # probability. 16.92 is the Chi^2 value for 9 degrees of freedom with
      # p=0.05. This test is probabilistic and would be flaky if the random
      # seed were not fixed.
      val = random_test_util.chi_squared(x, 10)
      self.assertLess(val, 16.92)
  
imports: import os
  import re
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.checkpoint import checkpoint
  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 errors
  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_random_ops
  from tensorflow.python.ops import gen_stateful_random_ops
  from tensorflow.python.ops import logging_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 test
label_desc: Use image node_id 29 for calling the StatefulRandomOpsTest obj's underlying member method code with example usage: obj.testDistributionOfUniform(dtype) without return types