code: def _sliding_mean_std(X, m):
      """Return the sliding mean and std for a time series and a window size.
  
      Parameters
      ----------
      X : array-like, shape [n]
          A single univariate time series of length n
      m : int
          The window size to generate sliding windows
  
      Returns
      -------
      Tuple (float, float)
          The moving mean and moving std
      """
      s = np.insert(np.cumsum(X), 0, 0)
      sSq = np.insert(np.cumsum(X**2), 0, 0)
      segSum = s[m:] - s[:-m]
      segSumSq = sSq[m:] - sSq[:-m]
      movmean = segSum / m
      movstd = np.sqrt(segSumSq / m - (segSum / m) ** 2)
  
      # avoid dividing by too small std, like 0
      movstd = np.where(abs(movstd) < 0.001, 1, movstd)
  
      return [movmean, movstd]
  
file_path: sktime/sktime/transformations/series/_clasp_numba.py
imports: import numpy
  import pandas
  from sktime.transformations.panel.matrix_profile import _sliding_dot_products
  from sktime.utils.numba.njit import njit
label_desc: Use image node_id 2 for calling a global function with example usage: _sliding_mean_std(X, m) and returns: list