code: def mnc2mc(mnc, wmean=True):
      """convert non-central to central moments, uses recursive formula
      optionally adjusts first moment to return mean
      """
      X = _convert_to_multidim(mnc)
  
      def _local_counts(mnc):
          mean = mnc[0]
          mnc = [1] + list(mnc)  # add zero moment = 1
          mu = []
          for n, m in enumerate(mnc):
              mu.append(0)
              for k in range(n + 1):
                  sgn_comb = (-1) ** (n - k) * comb(n, k, exact=True)
                  mu[n] += sgn_comb * mnc[k] * mean ** (n - k)
          if wmean:
              mu[1] = mean
          return mu[1:]
  
      res = np.apply_along_axis(_local_counts, 0, X)
      # for backward compatibility convert 1-dim output to list/tuple
      return _convert_from_multidim(res)
  
file_path: statsmodels/statsmodels/stats/moment_helpers.py
imports: import numpy
  from scipy.special import comb
label_desc: Use image node_id 4 for calling a global function with example usage: mnc2mc(mnc, wmean) and returns: _convert_from_multidim, mu