code: def mc2mnc(mc):
      """convert central to non-central moments, uses recursive formula
      optionally adjusts first moment to return mean
      """
      x = _convert_to_multidim(mc)
  
      def _local_counts(mc):
          mean = mc[0]
          mc = [1] + list(mc)  # add zero moment = 1
          mc[1] = 0  # define central mean as zero for formula
          mnc = [1, mean]  # zero and first raw moments
          for nn, m in enumerate(mc[2:]):
              n = nn + 2
              mnc.append(0)
              for k in range(n + 1):
                  mnc[n] += (
                      comb(n, k, exact=True) * mc[k] * mean ** (n - k)
                  )
          return mnc[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 3 for calling a global function with example usage: mc2mnc(mc) and returns: _convert_from_multidim, mnc