docstr: Test for objax.random.Generator.
docstr_tok: ["Test","for","objax.random.Generator","."]
code: def test_generator(self):
      """Test for objax.random.Generator."""
      g1 = objax.random.Generator(0)
      g2 = objax.random.Generator(0)
      g3 = objax.random.Generator(1)
      value1 = objax.random.randint(
          (3, 4), low=0, high=65536, generator=g1
      )
      value2 = objax.random.randint(
          (3, 4), low=0, high=65536, generator=g2
      )
      value3 = objax.random.randint(
          (3, 4), low=0, high=65536, generator=g3
      )
      self.assertTrue(np.all(value1 == value2))
      self.assertFalse(np.all(value1 == value3))
  
      g4 = objax.random.Generator(123)
      value = [
          objax.random.randint(
              shape=(1,), low=0, high=65536, generator=g4
          )
          for _ in range(2)
      ]
      self.assertNotEqual(value[0], value[1])
  
file_path: objax/tests/testrandom.py
imports: import unittest
  import numpy
  import scipy.stats
  import objax
label_desc: Use image node_id 9 for calling the TestRandom obj's underlying member method code with example usage: obj.test_generator() without return types