code: def testJohnsonSUSample(self):
      skewness = tf.constant(1.0)
      tailweight = tf.constant(2.0)
      mu = tf.constant(3.0)
      sigma = tf.constant(math.sqrt(3.0))
      mu_v = sp_stats.johnsonsu.mean(1.0, 2.0, 3.0, math.sqrt(3.0))
      sigma_v = sp_stats.johnsonsu.std(1.0, 2.0, 3.0, math.sqrt(3.0))
      n = tf.constant(100000)
      dist = johnson_su.JohnsonSU(
          skewness=skewness,
          tailweight=tailweight,
          loc=mu,
          scale=sigma,
          validate_args=True,
      )
      samples = dist.sample(n, seed=test_util.test_seed())
      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 = tf.TensorShape(
          [self.evaluate(n)]
      ).concatenate(
          tf.TensorShape(self.evaluate(dist.batch_shape_tensor()))
      )
  
      self.assertAllEqual(expected_samples_shape, samples.shape)
      self.assertAllEqual(expected_samples_shape, sample_values.shape)
  
      expected_samples_shape = tf.TensorShape(
          [self.evaluate(n)]
      ).concatenate(dist.batch_shape)
  
      self.assertAllEqual(expected_samples_shape, samples.shape)
      self.assertAllEqual(expected_samples_shape, sample_values.shape)
  
imports: import math
  import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import johnson_su
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 21 for calling the JohnsonSUTest obj's underlying member method code with example usage: obj.testJohnsonSUSample() without return types