code: def higuchi_fractal_dimension(epochs, param=hig_param):
      def hfd_1d(X, Kmax):
          L = []
          x = []
          N = len(X)
          for k in range(1, Kmax):
              Lk = []
              for m in range(0, k):
                  Lmk = 0
                  for i in range(1, int(np.floor((N - m) / k))):
                      Lmk += abs(X[m + i * k] - X[m + i * k - k])
                  Lmk = Lmk * (N - 1) / np.floor((N - m) / float(k)) / k
                  Lk.append(Lmk)
              L.append(np.log(np.mean(Lk)))
              x.append([np.log(float(1) / k), 1])
  
          (p, r1, r2, s) = np.linalg.lstsq(x, L, rcond=None)
          return p[0]
  
      return [
          (
              "Kmax_{}".format(config["Kmax"]),
              np.apply_along_axis(
                  hfd_1d, 0, epochs, config["Kmax"]
              ).ravel()[0],
          )
          for config in param
      ]
  
imports: import pandas
  import numpy
  from statsmodels.tsa.stattools import acf, adfuller, pacf
  import itertools
  from statsmodels.tsa.ar_model import AR
  from scipy.signal import cwt, find_peaks_cwt, ricker, welch
  from scipy.stats import linregress
  import scipy.stats
  from scipy.stats import kurtosis
  from scipy.stats import skew
  import numpy
  from scipy import signal, integrate
  from scipy.interpolate import interp1d
  import math
  from statsmodels.tools.sm_exceptions import MissingDataError
  from numpy.linalg import LinAlgError
label_desc: Use image node_id 42 for calling a global function with example usage: higuchi_fractal_dimension(epochs, param) and returns: unknown, p