code: def testNormalSample(self):
      mu = constant_op.constant(3.0)
      sigma = constant_op.constant(math.sqrt(3.0))
      mu_v = 3.0
      sigma_v = np.sqrt(3.0)
      n = constant_op.constant(100000)
      normal = normal_lib.Normal(loc=mu, scale=sigma)
      samples = normal.sample(n)
      sample_values = self.evaluate(samples)
      # Note that the standard error for the sample mean is ~ sigma / sqrt(n).
      # The sample variance similarly is dependent on sigma and n.
      # Thus, the tolerances below are very sensitive to number of samples
      # as well as the variances chosen.
      self.assertEqual(sample_values.shape, (100000,))
      self.assertAllClose(sample_values.mean(), mu_v, atol=1e-1)
      self.assertAllClose(sample_values.std(), sigma_v, atol=1e-1)
  
      expected_samples_shape = tensor_shape.TensorShape(
          [self.evaluate(n)]
      ).concatenate(
          tensor_shape.TensorShape(
              self.evaluate(normal.batch_shape_tensor())
          )
      )
  
      self.assertAllEqual(expected_samples_shape, samples.get_shape())
      self.assertAllEqual(expected_samples_shape, sample_values.shape)
  
      expected_samples_shape = tensor_shape.TensorShape(
          [self.evaluate(n)]
      ).concatenate(normal.batch_shape)
  
      self.assertAllEqual(expected_samples_shape, samples.get_shape())
      self.assertAllEqual(expected_samples_shape, sample_values.shape)
  
imports: import importlib
  import math
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.distributions import kullback_leibler
  from tensorflow.python.ops.distributions import normal
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 25 for calling the NormalTest obj's underlying member method code with example usage: obj.testNormalSample() without return types