code: def _fluct_prop(X, og_length, dfa):
      a = np.zeros(50, dtype=np.int_)
      a[0] = 5
      n_tau = 1
      smin = 1.6094379124341003  # Math.log(5);
      smax = np.log(og_length / 2)
      inc = (smax - smin) / 49
      for i in range(1, 50):
          val = int(np.round(np.exp(smin + inc * i) + 0.000000000001))
          if val != a[n_tau - 1]:
              a[n_tau] = val
              n_tau += 1
  
      if n_tau < 12:
          return np.nan
  
      f = np.zeros(n_tau)
      for i in range(n_tau):
          tau = a[i]
          buff_size = int(len(X) / tau)
          lag = 0
          if buff_size == 0:
              buff_size = 1
              lag = 1
  
          buffer = np.zeros((buff_size, tau))
          count = 0
          for n in range(buff_size):
              for j in range(tau - lag):
                  buffer[n][j] = X[count]
                  count += 1
  
          d = np.zeros(tau)
          for n in range(tau):
              d[n] = n + 1
  
          for n in range(buff_size):
              c1, c2 = _linear_regression(d, buffer[n], tau, 0)
  
              for j in range(tau):
                  buffer[n][j] = buffer[n][j] - (c1 * (j + 1) + c2)
  
              if dfa:
                  for j in range(tau):
                      f[i] += buffer[n][j] * buffer[n][j]
              else:
                  f[i] += np.power(
                      np.max(buffer[n]) - np.min(buffer[n]), 2
                  )
  
          if dfa:
              f[i] = np.sqrt(f[i] / (buff_size * tau))
          else:
              f[i] = np.sqrt(f[i] / buff_size)
  
      log_a = np.zeros(n_tau)
      log_f = np.zeros(n_tau)
      for i in range(n_tau):
          log_a[i] = np.log(a[i])
          log_f[i] = np.log(f[i])
  
      sserr = np.zeros(n_tau - 11)
      for i in range(6, n_tau - 5):
          c1_1, c1_2 = _linear_regression(log_a, log_f, i, 0)
          c2_1, c2_2 = _linear_regression(
              log_a, log_f, n_tau - i + 1, i - 1
          )
  
          sum1 = 0
          for n in range(i):
              sum1 += np.power(log_a[n] * c1_1 + c1_2 - log_f[n], 2)
          sserr[i - 6] += np.sqrt(sum1)
  
          sum2 = 0
          for n in range(n_tau - i + 1):
              sum2 += np.power(
                  log_a[n + i - 1] * c2_1 + c2_2 - log_f[n + i - 1], 2
              )
          sserr[i - 6] += np.sqrt(sum2)
  
      return (np.argmin(sserr) + 6) / n_tau
  
imports: import math
  import numpy
  from sktime.utils.numba.njit import njit
label_desc: Use image node_id 11 for calling a global function with example usage: _fluct_prop(X, og_length, dfa) and returns: unknown, np