code: def testSampleWithPartiallyDefinedShapeEndingInOne(self):
      param = tf.Variable(
          np.ones((8, 16, 16, 1)),
          shape=tf.TensorShape([None, 16, 16, 1]),
      )
      self.evaluate(param.initializer)
      samples = self.evaluate(
          exp_gamma_lib.ExpGamma(param, rate=param).sample(
              seed=test_util.test_seed()
          )
      )
      self.assertEqual(samples.shape, (8, 16, 16, 1))
      samples = self.evaluate(
          exp_gamma_lib.ExpGamma(param, log_rate=param).sample(
              seed=test_util.test_seed()
          )
      )
      self.assertEqual(samples.shape, (8, 16, 16, 1))
  
imports: 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 exp_gamma
  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 test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 3 for calling the ExpGammaTest obj's underlying member method code with example usage: obj.testSampleWithPartiallyDefinedShapeEndingInOne() without return types