code: def testSampleXLA(self):
      self.skip_if_no_xla()
      if not tf.executing_eagerly():
          return  # jit_compile is eager-only.
      concentration = np.exp(np.random.rand(4, 3).astype(np.float32))
      rate = np.exp(np.random.rand(4, 3).astype(np.float32))
      dist = gamma_lib.Gamma(
          concentration=concentration, rate=rate, validate_args=True
      )
      # Verify the compile succeeds going all the way through the distribution.
      self.evaluate(
          tf.function(
              lambda: dist.sample(5, seed=test_util.test_seed()),
              jit_compile=True,
          )()
      )
      # Also test the low-level sampler and verify the XLA-friendly variant.
      scalar_gamma = tf.function(
          functools.partial(
              gamma_lib.random_gamma_with_runtime, shape=[]
          ),
          jit_compile=True,
      )
      _, runtime = self.evaluate(
          scalar_gamma(
              concentration=tf.constant(1.0), seed=test_util.test_seed()
          )
      )
      self.assertEqual(
          implementation_selection._RUNTIME_DEFAULT, runtime
      )
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  from scipy import misc
  from scipy import special
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import implementation_selection
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 3 for calling the GammaSamplingTest obj's underlying member method code with example usage: obj.testSampleXLA() without return types