code: def testDistribution(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.
          np_random.seed(10)
          outputs = [np_random.randn(*args) for _ in range(num_samples)]
  
          # Test output shape.
          for output in outputs:
              self.assertEqual(output.shape, tuple(args))
              default_dtype = (
                  np_dtypes.float64
                  if np_dtypes.is_allow_float64()
                  else np_dtypes.float32
              )
              self.assertEqual(
                  output.dtype.as_numpy_dtype, default_dtype
              )
  
          if np_array_ops.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_array_ops.mean(outputs, axis=0)
              stddev = np_array_ops.std(outputs, axis=0)
              self.assertAllClose(
                  mean, np_array_ops.zeros(args), atol=tol
              )
              self.assertAllClose(
                  stddev, np_array_ops.ones(args), atol=tol
              )
  
              # Test that outputs are different with different seeds.
              np_random.seed(20)
              diff_seed_outputs = [
                  np_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.
              np_random.seed(10)
              same_seed_outputs = [
                  np_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)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import ops
  from tensorflow.python.ops.numpy_ops import np_array_ops
  from tensorflow.python.ops.numpy_ops import np_dtypes
  from tensorflow.python.ops.numpy_ops import np_math_ops
  from tensorflow.python.ops.numpy_ops import np_random
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the RandNDistriutionTest obj's underlying member method code with example usage: obj.testDistribution() without return types