code: def testGeometricLogPmf_validate_args(self):
      batch_size = 6
      probs = tf.constant([0.9] * batch_size)
      x = tf1.placeholder_with_default(
          [2.5, 3.2, 4.3, 5.1, 6.0, 7.0], shape=[6]
      )
      geom = geometric.Geometric(probs=probs, validate_args=True)
  
      with self.assertRaisesOpError(
          "cannot contain fractional components"
      ):
          self.evaluate(geom.log_prob(x))
  
      with self.assertRaisesOpError("Condition x >= 0"):
          self.evaluate(geom.log_prob([-1.0]))
  
      geom = geometric.Geometric(probs=probs, validate_args=False)
      log_prob = geom.log_prob(x)
      self.assertEqual(
          [
              6,
          ],
          log_prob.shape,
      )
      pmf = geom.prob(x)
      self.assertEqual(
          [
              6,
          ],
          pmf.shape,
      )
  
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 4 for calling the GeometricTest obj's underlying member method code with example usage: obj.testGeometricLogPmf_validate_args() without return types