code: def testHalfNormalSample(self):
      scale = tf.constant(3.0)
      n = tf.constant(100000)
      halfnorm = half_normal.HalfNormal(scale=scale, validate_args=True)
  
      sample = halfnorm.sample(n, seed=test_util.test_seed())
  
      self.assertEqual(self.evaluate(sample).shape, (100000,))
      self.assertAllClose(
          self.evaluate(sample).mean(),
          3.0 * np.sqrt(2.0) / np.sqrt(np.pi),
          atol=1e-1,
      )
  
      expected_shape = tf.TensorShape([self.evaluate(n)]).concatenate(
          tf.TensorShape(self.evaluate(halfnorm.batch_shape_tensor()))
      )
      self.assertAllEqual(expected_shape, sample.shape)
      self.assertAllEqual(expected_shape, self.evaluate(sample).shape)
  
      expected_shape_static = tf.TensorShape(
          [self.evaluate(n)]
      ).concatenate(halfnorm.batch_shape)
      self.assertAllEqual(expected_shape_static, sample.shape)
      self.assertAllEqual(
          expected_shape_static, self.evaluate(sample).shape
      )
  
imports: from absl.testing import parameterized
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 19 for calling the HalfNormalTest obj's underlying member method code with example usage: obj.testHalfNormalSample() without return types