code: def testHorseshoeSample(self):
      scale = self.dtype(2.6)
      n = 100000
      dist = horseshoe.Horseshoe(scale=scale, validate_args=True)
  
      sample = dist.sample(n, seed=test_util.test_seed())
      self.assertEqual(self.evaluate(sample).shape, (n,))
  
      scale_mle = self._scale_mle(
          sample,
          scale_candidates=self._test_param(np.linspace(2, 3, 11)),
      )
      self.assertAllClose(scale, self.evaluate(scale_mle), atol=1e-2)
  
      expected_shape = tf.TensorShape([n]).concatenate(
          tf.TensorShape(self.evaluate(dist.batch_shape_tensor()))
      )
      self.assertAllEqual(expected_shape, sample.shape)
      self.assertAllEqual(expected_shape, self.evaluate(sample).shape)
  
      expected_shape_static = tf.TensorShape([n]).concatenate(
          dist.batch_shape
      )
      self.assertAllEqual(expected_shape_static, sample.shape)
      self.assertAllEqual(
          expected_shape_static, self.evaluate(sample).shape
      )
  
imports: import numpy
  import scipy.stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import horseshoe
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 6 for calling the _HorseshoeTest obj's underlying member method code with example usage: obj.testHorseshoeSample() without return types