class_docstr: Computes running central moments.
  
  `RunningCentralMoments` will compute arbitrary central moments in
  streaming fashion following the formula proposed by Philippe Pebay
  (2008) [1]. For reference, the formula we refer to is the incremental
  version of arbitrary moments (equation 2.9). Since the algorithm computes
  moments as a function of lower ones, even if not requested, all lower
  moments will be computed as well. The moments that are actually returned
  is specified by the `moment` parameter at initialization. Note, while
  any arbitrarily high central moment is theoretically supported,
  `RunningCentralMoments` cannot guarantee numerical stability for all
  moments.
  
  #### References
  [1]: Philippe Pebay. Formulas for Robust, One-Pass Parallel Computation of
        Covariances and Arbitrary-Order Statistical Moments. _Technical Report
        SAND2008-6212_, 2008.
        https://prod-ng.sandia.gov/techlib-noauth/access-control.cgi/2008/086212.pdf
docstr: Returns the central moments represented by this `RunningCentralMoments`.
  
  Returns:
    all_moments: A `Tensor` representing estimates of the requested central
      moments. Its leading dimension indexes the moment, in order of those
      requested (i.e. in order of `self.desired_moments`).
docstr_tok: ["Returns","the","central","moments","represented","by","this","`","RunningCentralMoments","`",".","Returns",":","all_moments",":","A","`","Tensor","`","representing","estimates","of","the","requested","central","moments",".","Its","leading","dimension","indexes","the","moment",",","in","order","of","those","requested","(","i.e",".","in","order","of","`","self.desired_moments","`",")","."]
code: def moments(self):
      """Returns the central moments represented by this `RunningCentralMoments`.
  
      Returns:
        all_moments: A `Tensor` representing estimates of the requested central
          moments. Its leading dimension indexes the moment, in order of those
          requested (i.e. in order of `self.desired_moments`).
      """
      # prepend a structure of zeros for the first moment
      shape = self.mean_state.mean.shape
      dtype = self.mean_state.mean.dtype
      all_unfinalized_moments = tf.concat(
          [
              tf.zeros(ps.concat([(1,), shape], axis=0), dtype),
              self.exponentiated_residuals,
          ],
          axis=0,
      )
      all_moments = all_unfinalized_moments / tf.cast(
          self.mean_state.num_samples, dtype
      )
      desired_moment_indices = (
          tf.convert_to_tensor(self.desired_moments, dtype=tf.int32) - 1
      )
      return tf.gather(all_moments, desired_moment_indices)
  
imports: import functools
  import math
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.mcmc import diagnostic
  from tensorflow.python.util import nest
label_desc: Use image node_id 7 for calling the RunningCentralMoments obj's underlying member method code with example usage: obj.moments() and returns: tf