code: def var_index(time, param=var_index_param):
      final = []
      keys = []
      for key, magnitude in param.items():
          w = 1.0 / np.power(np.subtract(time[1:], time[:-1]), 2)
          w_mean = np.mean(w)
  
          N = len(time)
          sigma2 = np.var(magnitude)
  
          S1 = sum(w * (magnitude[1:] - magnitude[:-1]) ** 2)
          S2 = sum(w)
  
          eta_e = (
              w_mean
              * np.power(time[N - 1] - time[0], 2)
              * S1
              / (sigma2 * S2 * N**2)
          )
          final.append(eta_e)
          keys.append(key)
      return {
          "Interact__{}".format(k): eta_e
          for eta_e, k in zip(final, keys)
      }
  
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 8 for calling a global function with example usage: var_index(time, param) and returns: unknown