code: def testGeometricSample(self):
      probs_v = [0.3, 0.9]
      probs = tf.constant(probs_v)
      n = tf.constant(100000)
      geom = geometric.Geometric(probs=probs, validate_args=True)
  
      samples = geom.sample(n, seed=test_util.test_seed())
      self.assertEqual([100000, 2], samples.shape)
  
      sample_values = self.evaluate(samples)
      self.assertFalse(np.any(sample_values < 0.0))
      for i in range(2):
          self.assertAllClose(
              sample_values[:, i].mean(),
              stats.geom.mean(probs_v[i], loc=-1),
              rtol=0.04,
          )
          self.assertAllClose(
              sample_values[:, i].var(),
              stats.geom.var(probs_v[i], loc=-1),
              rtol=0.04,
          )
  
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import geometric
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 13 for calling the GeometricTest obj's underlying member method code with example usage: obj.testGeometricSample() without return types