code: def ckf_transform(Xs, Q):
      """
      Compute mean and covariance of array of cubature points.
  
      Parameters
      ----------
  
      Xs : ndarray
          Cubature points
  
      Q : ndarray
          Noise covariance
  
      Returns
      -------
  
      mean : ndarray
           mean of the cubature points
  
      variance: ndarray
           covariance matrix of the cubature points
      """
  
      m, n = Xs.shape
  
      x = sum(Xs, 0)[:, None] / m
      P = np.zeros((n, n))
      xf = x.flatten()
      for k in range(m):
          P += np.outer(Xs[k], Xs[k]) - np.outer(xf, xf)
  
      P *= 1 / m
      P += Q
  
      return x, P
  
file_path: filterpy/filterpy/kalman/CubatureKalmanFilter.py
imports: from __future__ import absolute_import, division
  from copy import deepcopy
  from math import log, exp, sqrt
  import sys
  import numpy
  from numpy import eye, zeros, dot, isscalar
  from scipy.linalg import inv, cholesky
  from filterpy.stats import logpdf
  from filterpy.common import pretty_str, outer_product_sum
label_desc: Use image node_id 2 for calling a global function with example usage: ckf_transform(Xs, Q) and returns: x,  P