class_docstr: Distribution followed by tanh.
class_docstr_tok: ["Distribution","followed","by","tanh","."]
code: def log_prob(self, event):
      # Without this clip there would be NaNs in the inner tf.where and that
      # causes issues for some reasons.
      event = jnp.clip(event, -self._threshold, self._threshold)
      # The inverse image of {threshold} is the interval [atanh(threshold), inf]
      # which has a probability of "log_prob_right" under the given distribution.
      return jnp.where(
          event <= -self._threshold,
          self._log_prob_left,
          jnp.where(
              event >= self._threshold,
              self._log_prob_right,
              super().log_prob(event),
          ),
      )
  
imports: from typing import Any, List, Optional, Sequence, Union, Callable
  import chex
  import haiku
  import jax
  import jax.numpy
  import numpy
  import tensorflow_probability
  import tensorflow_probability.substrates.jax
label_desc: Use image node_id 2 for calling the TanhTransformedDistribution obj's underlying member method code with example usage: obj.log_prob(event) and returns: jnp