code: def _dist_jd_log_prob_ratio(p, x, q, y, name=None):
      """Distributed log-prob ratio for JDs."""
      with tf.name_scope(name or "dist_jd_log_prob_ratio"):
          tf.nest.assert_same_structure(x, y)
  
          p_axis_names = p.experimental_shard_axis_names
          q_axis_names = q.experimental_shard_axis_names
          if p_axis_names != q_axis_names:
              raise ValueError(
                  "p and q must use the same sharding. "
                  f"Saw: p: {p}, {p_axis_names}, q: {q}, {q_axis_names}"
              )
          return jd_lib._jd_log_prob_ratio(p, x, q, y, name=name)
  
imports: import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.distributions import joint_distribution
  from tensorflow_probability.python.distributions import joint_distribution_coroutine
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import distribute_lib
  from tensorflow_probability.python.internal import samplers
label_desc: Use image node_id 3 for calling a global function with example usage: _dist_jd_log_prob_ratio(p, x, q, y, name) and returns: jd_lib