code: def _get_cdf(pdf: TensorLike, name="get_cdf"):
      """Estimates the cumulative distribution function of a probability distribution.
  
      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 "_get_cdf".
  
      Returns:
        A tensor of shape `[A1, ..., An, M+1]`.
      """
      with tf.name_scope(name):
          pdf = tf.convert_to_tensor(value=pdf)
          batch_shape = tf.shape(pdf)[:-1]
          cdf = tf.cumsum(pdf, -1)
          cdf = tf.concat(
              [tf.zeros(tf.concat([batch_shape, [1]], axis=-1)), cdf],
              -1,
          )
          return cdf
  
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 10 for calling a global function with example usage: _get_cdf(pdf, name) and returns: cdf