class_docstr: Geometric distribution.
  
  The Geometric distribution is parameterized by p, the probability of a
  positive event. It represents the probability that in k + 1 Bernoulli trials,
  the first k trials failed, before seeing a success.
  
  The pmf of this distribution is:
  
  #### Mathematical Details
  
  ```none
  pmf(k; p) = (1 - p)**k * p
  ```
  
  where:
  
  * `p` is the success probability, `0 < p <= 1`, and,
  * `k` is a non-negative integer.
class_docstr_tok: ["Geometric","distribution",".","The","Geometric","distribution","is","parameterized","by","p",",","the","probability","of","a","positive","event",".","It","represents","the","probability","that","in","k","+","1","Bernoulli","trials",",","the","first","k","trials","failed",",","before","seeing","a","success",".","The","pmf","of","this","distribution","is",":","#","#","#","#","Mathematical","Details","``","`","none","pmf","(","k",";","p",")","=","(","1","-","p",")","*","*","k","*","p","``","`","where",":","*","`","p","`","is","the","success","probability",",","`","0","<","p","<","=","1","`",",","and",",","*","`","k","`","is","a","non-negative","integer","."]
code: def _sample_n(self, n, seed=None):
      # Uniform variates must be sampled from the open-interval `(0, 1)` rather
      # than `[0, 1)`. To do so, we use
      # `np.finfo(dtype_util.as_numpy_dtype(self.dtype)).tiny`
      # because it is the smallest, positive, 'normal' number. A 'normal' number
      # is such that the mantissa has an implicit leading 1. Normal, positive
      # numbers x, y have the reasonable property that, `x + y >= max(x, y)`. In
      # this case, a subnormal number (i.e., np.nextafter) can cause us to sample
      # 0.
      probs = self._probs_parameter_no_checks()
      sampled = samplers.uniform(
          ps.concat([[n], ps.shape(probs)], 0),
          minval=np.finfo(dtype_util.as_numpy_dtype(self.dtype)).tiny,
          maxval=1.0,
          seed=seed,
          dtype=self.dtype,
      )
  
      return tf.floor(tf.math.log(sampled) / tf.math.log1p(-probs))
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softmax_centered
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 8 for calling the Geometric obj's underlying member method code with example usage: obj._sample_n(n, seed) and returns: tf