code: def _normalize_pdf(
      pdf: TensorLike, name="normalize_pdf"
  ) -> tf.Tensor:
      """Normalizes a probability density function.
  
      Args:
        pdf: A tensor of shape `[A1, ..., An, M]` containing the probability
          distribution in M bins.
        name:  A name for this op that defaults to "_normalize_pdf".
  
      Returns:
        A tensor of shape `[A1, ..., An, M]`.
      """
      with tf.name_scope(name):
          pdf = tf.convert_to_tensor(value=pdf)
          pdf += 1e-5
          return safe_ops.safe_signed_div(
              pdf, tf.reduce_sum(pdf, -1, keepdims=True)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow_graphics.util import export_api
  from tensorflow_graphics.util import safe_ops
  from tensorflow_graphics.util import shape
  from tensorflow_graphics.util.type_alias import TensorLike
label_desc: Use image node_id 9 for calling a global function with example usage: _normalize_pdf(pdf, name) and returns: safe_ops