code: def _transformed_log_prob_ratio(p, x, q, y, name=None):
      """Computes p.log_prob(x) - q.log_prob(y) for p and q both TDs."""
      with tf.name_scope(name or "transformed_log_prob_ratio"):
          x_ = p.bijector.inverse(x)
          y_ = q.bijector.inverse(y)
  
          base_log_prob_ratio = log_prob_ratio.log_prob_ratio(
              p.distribution, x_, q.distribution, y_
          )
  
          event_ndims = tf.nest.map_structure(
              ps.rank_from_shape,
              p.event_shape_tensor,
              tf.nest.map_structure(
                  tensorshape_util.merge_with,
                  p.event_shape,
                  q.event_shape,
              ),
          )
          ildj_ratio = ldj_ratio.inverse_log_det_jacobian_ratio(
              p.bijector, x, q.bijector, y, event_ndims
          )
          return base_log_prob_ratio + tf.cast(
              ildj_ratio, base_log_prob_ratio.dtype
          )
  
imports: import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import ldj_ratio
  from tensorflow_probability.python.distributions import batch_broadcast
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 3 for calling a global function with example usage: _transformed_log_prob_ratio(p, x, q, y, name) and returns: unknown