code: def find_freq(serie, param=freq_param):
      final = []
      for par in param:
          fft0 = np.fft.rfft(serie * np.hanning(len(serie)))
          freqs = np.fft.rfftfreq(len(serie), d=1.0 / par["fs"])
          fftmod = np.array(
              [
                  np.sqrt(fft0[i].real ** 2 + fft0[i].imag ** 2)
                  for i in range(0, len(fft0))
              ]
          )
          d = {"fft": fftmod, "freq": freqs}
          df = pd.DataFrame(d)
          hop = df.sort_values(["fft"], ascending=False)
          rows = hop.iloc[: par["sel"]]
          final.append(rows["freq"].mean())
  
      return [
          ("Fs_{}__sel{}".format(pa["fs"], pa["sel"]), fin)
          for pa, fin in zip(param, final)
      ]
  
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 48 for calling a global function with example usage: find_freq(serie, param) and returns: unknown