code: def augment_kl_xent_docs(distributions_module):
      """Augments doc on tfd.kl_divergence, EachDist.kl_divergence/cross_entropy."""
      dist_classes = _dist_classes(distributions_module)
      kl_divergence.__doc__ += _summarize_registered_kls(dist_classes)
  
      if not six.PY3:
          return  # Cannot update __doc__ on instancemethod objects in PY2.
  
      for dist_class in dist_classes:
          others = []
          for p, q in _DIVERGENCES:
              if issubclass(dist_class, p):
                  others.extend(
                      subq.__name__
                      for subq in dist_classes
                      if issubclass(subq, q)
                  )
          others = sorted(set(others))
  
          def merge_doc(original, additional):
              for line in original.split("\n"):
                  if "args:" == line.strip().lower():
                      indent = line.lower().split("args")[0]
                      yield "{}{}\n{}".format(
                          indent, additional, indent
                      )
                  yield line
  
          if others:
              others_str = ", ".join(
                  "`{}`".format(other) for other in others
              )
              dist_class.kl_divergence.__doc__ = "\n".join(
                  merge_doc(
                      dist_class.kl_divergence.__doc__,
                      "`other` types with built-in registrations: {}".format(
                          others_str
                      ),
                  )
              )
              dist_class.cross_entropy.__doc__ = "\n".join(
                  merge_doc(
                      dist_class.cross_entropy.__doc__,
                      "`other` types with built-in registrations: {}".format(
                          others_str
                      ),
                  )
              )
  
file_path: probability/tensorflow_probability/python/distributions/kullback_leibler.py
imports: import inspect
  import six
  import tensorflow.compat.v2
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 6 for calling a global function with example usage: augment_kl_xent_docs(distributions_module) without return types