code: def _kl_half_normal_half_normal(a, b, name=None):
      """Calculate the batched KL divergence KL(a || b) with a and b `HalfNormal`.
  
      Args:
        a: Instance of a `HalfNormal` distribution object.
        b: Instance of a `HalfNormal` distribution object.
        name: Python `str` name to use for created operations.
          Default value: `None` (i.e., `'kl_half_normal_half_normal'`).
  
      Returns:
        kl_div: Batchwise KL(a || b)
      """
      with tf.name_scope(name or "kl_half_normal_half_normal"):
          # Consistent with
          # http://www.mast.queensu.ca/~communications/Papers/gil-msc11.pdf, page 119
          a_scale = tf.convert_to_tensor(a.scale)
          b_scale = tf.convert_to_tensor(b.scale)
          return (
              tf.math.log(b_scale)
              - tf.math.log(a_scale)
              + (a_scale**2 - b_scale**2) / (2.0 * b_scale**2)
          )
  
imports: import math
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  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 prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 1 for calling a global function with example usage: _kl_half_normal_half_normal(a, b, name) and returns: unknown