class_docstr: Test cases for random-number generating operators.
code: def testRandomUniformIsInRange(self):
      for dtype in self._random_types():
          # TODO (b/112272078): enable bfloat16 for CPU and GPU when the bug is
          # fixed.
          if (self.device in ["XLA_GPU", "XLA_CPU"]) and (
              dtype in [dtypes.bfloat16, dtypes.half]
          ):
              continue
          with self.session():
              with self.test_scope():
                  x = random_ops.random_uniform(
                      shape=[1000], dtype=dtype, minval=-2, maxval=33
                  )
              y = self.evaluate(x)
              msg = str(y) + str(dtype)
              self.assertEqual((y >= -2).sum(), 1000, msg)
              self.assertEqual((y < 33).sum(), 1000, msg)
  
imports: import math
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops.distributions import special_math
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 6 for calling the RandomOpsTest obj's underlying member method code with example usage: obj.testRandomUniformIsInRange() without return types