code: def testGammaSampleZeroAndNegativeParameters(self):
      gamma = gamma_lib.Gamma([1.0, 2.0], 1.0, validate_args=False)
      seed_stream = test_util.test_seed_stream()
      samples = self.evaluate(gamma.sample(seed=seed_stream()))
      self.assertEqual(samples.shape, (2,))
      self.assertAllFinite(samples)
  
      gamma = gamma_lib.Gamma([0.0, 2.0], 1.0, validate_args=False)
      samples = self.evaluate(gamma.sample(seed=seed_stream()))
      self.assertEqual(samples.shape, (2,))
      self.assertAllEqual(
          [s in [0, np.finfo(np.float32).tiny] for s in samples],
          [True, False],
      )
  
      gamma = gamma_lib.Gamma([-0.001, 2.0], 1.0, validate_args=False)
      samples = self.evaluate(gamma.sample(seed=seed_stream()))
      self.assertEqual(samples.shape, (2,))
      self.assertAllEqual([np.isnan(s) for s in samples], [True, False])
  
      gamma = gamma_lib.Gamma([1.0, -1.0], 1.0, validate_args=False)
      samples = self.evaluate(gamma.sample(seed=seed_stream()))
      self.assertEqual(samples.shape, (2,))
      self.assertAllEqual([np.isnan(s) for s in samples], [False, True])
  
      gamma = gamma_lib.Gamma([1.0, 2.0], 0.0, validate_args=False)
      samples = self.evaluate(gamma.sample(seed=seed_stream()))
      self.assertEqual(samples.shape, (2,))
      self.assertAllPositiveInf(samples)
  
      gamma = gamma_lib.Gamma([1.0, 2.0], -1.0, validate_args=False)
      samples = self.evaluate(gamma.sample(seed=seed_stream()))
      self.assertEqual(samples.shape, (2,))
      self.assertAllNan(samples)
  
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 19 for calling the GammaTest obj's underlying member method code with example usage: obj.testGammaSampleZeroAndNegativeParameters() without return types