class_docstr: The finite discrete distribution.
  
  The FiniteDiscrete distribution is parameterized by either probabilities or
  log-probabilities of a set of `K` possible outcomes, which is defined by
  a strictly ascending list of `K` values.
  
  Note: log_prob, prob, cdf, mode, and entropy are differentiable with respect
  to `logits` or `probs` but not with respect to `outcomes`.
  
  #### Mathematical Details
  
  The probability mass function (pmf) is,
  
  ```none
  pmf(x; pi, qi) = prod_j pi_j**[x == qi_j]
  ```
  
  #### Examples
  
  ```python
  
  # Initialize a discrete distribution with 4 possible outcomes and the 2nd
  # outcome being most likely.
  dist = FiniteDiscrete([1., 2., 4., 8.], probs=[0.1, 0.4, 0.3, 0.2])
  dist.prob(2.)
  # ==> 0.4
  
  # Using logits to initialize a discrete distribution with 4 possible outcomes
  # and the 2nd outcome being most likely.
  dist = FiniteDiscrete([1., 2., 4., 8.], logits=np.log([0.1, 0.4, 0.3, 0.2]))
  dist.prob(2.)
  # ==> 0.4
  ```
code: def _log_prob(self, x):
      x = tf.convert_to_tensor(x, name="x")
      right_indices = tf.minimum(
          tf.size(self.outcomes) - 1,
          tf.reshape(
              tf.searchsorted(
                  self.outcomes,
                  values=tf.reshape(x, shape=[-1]),
                  side="right",
              ),
              ps.shape(x),
          ),
      )
      use_right_indices = self._is_equal_or_close(
          x, tf.gather(self.outcomes, indices=right_indices)
      )
      left_indices = tf.maximum(0, right_indices - 1)
      use_left_indices = self._is_equal_or_close(
          x, tf.gather(self.outcomes, indices=left_indices)
      )
      log_probs = self._categorical.log_prob(
          tf.where(use_left_indices, left_indices, right_indices)
      )
      return tf.where(
          tf.logical_not(use_left_indices | use_right_indices),
          dtype_util.as_numpy_dtype(log_probs.dtype)(-np.inf),
          log_probs,
      )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import ascending
  from tensorflow_probability.python.bijectors import softmax_centered
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import categorical
  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 tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 11 for calling the FiniteDiscrete obj's underlying member method code with example usage: obj._log_prob(x) and returns: tf