code: def testRandN(self):
      def run_test(*args):
          num_samples = 1000
          tol = 0.1  # High tolerance to keep the # of samples low else the test
          # takes a long time to run.
          random.seed(10)
          outputs = [random.randn(*args) for _ in range(num_samples)]
  
          # Test output shape.
          for output in outputs:
              self.assertEqual(output.shape, tuple(args))
              self.assertEqual(
                  output.dtype.type, random.DEFAULT_RANDN_DTYPE
              )
  
          if np.prod(args):  # Don't bother with empty arrays.
              outputs = [output.tolist() for output in outputs]
  
              # Test that the properties of normal distribution are satisfied.
              mean = np.mean(outputs, axis=0)
              stddev = np.std(outputs, axis=0)
              self.assertAllClose(mean, np.zeros(args), atol=tol)
              self.assertAllClose(stddev, np.ones(args), atol=tol)
  
              # Test that outputs are different with different seeds.
              random.seed(20)
              diff_seed_outputs = [
                  random.randn(*args).tolist()
                  for _ in range(num_samples)
              ]
              self.assertNotAllClose(outputs, diff_seed_outputs)
  
              # Test that outputs are the same with the same seed.
              random.seed(10)
              same_seed_outputs = [
                  random.randn(*args).tolist()
                  for _ in range(num_samples)
              ]
              self.assertAllClose(outputs, same_seed_outputs)
  
      run_test()
      run_test(0)
      run_test(1)
      run_test(5)
      run_test(2, 3)
      run_test(0, 2, 3)
      run_test(2, 0, 3)
      run_test(2, 3, 0)
      run_test(2, 3, 5)
  
file_path: trax/trax/tf_numpy/numpy_impl/tests/random_test.py
imports: import numpy
  from six.moves import range
  import tensorflow.compat.v2
  from trax.tf_numpy.numpy_impl import array_ops
  from trax.tf_numpy.numpy_impl import random
label_desc: Use image node_id 2 for calling the RandomTest obj's underlying member method code with example usage: obj.testRandN() without return types