code: def _kl_chi_chi(a, b, name=None):
      """Calculate the batched KL divergence KL(a || b) with a and b Chi.
  
      Args:
        a: instance of a Chi distribution object.
        b: instance of a Chi distribution object.
        name: (optional) Name to use for created operations.
          default is 'kl_chi_chi'.
  
      Returns:
        Batchwise KL(a || b)
      """
      with tf.name_scope(name or "kl_chi_chi"):
          a_df = tf.convert_to_tensor(a.df)
          b_df = tf.convert_to_tensor(b.df)
          # Consistent with
          # https://mast.queensu.ca/~communications/Papers/gil-msc11.pdf, page 118
          # The paper introduces an additional scaling parameter; setting that
          # parameter to 1 and simplifying yields the expression we use here.
          return (
              0.5 * tf.math.digamma(0.5 * a_df) * (a_df - b_df)
              + tf.math.lgamma(0.5 * b_df)
              - tf.math.lgamma(0.5 * a_df)
          )
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.bijectors import square
  from tensorflow_probability.python.distributions import chi2
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 1 for calling a global function with example usage: _kl_chi_chi(a, b, name) and returns: unknown