code: def find_best_curve(t, signal):
      """Finds the best curve.
  
      Parameters
      ----------
      t : nd-array
          Log space
      signal : nd-array
          Mean execution time array
  
      Returns
      -------
      str
          Best fit curve name
  
      """
  
      all_chisq = []
      list_curves = [n_squared, n_nlog, n_linear, n_log, n_constant]
      all_curves = []
      # Model parameters
      stdev = 2
      sig = np.zeros(len(signal)) + stdev
  
      # Fit the curve
      for curve in list_curves:
          start = 1
          popt, pcov = curve_fit(
              curve, t, signal, sigma=sig, p0=start, absolute_sigma=True
          )
  
          # Compute chi square
          nexp = curve(t, *popt)
          r = signal - nexp
          chisq = np.sum((r / stdev) ** 2)
          all_chisq.append(chisq)
          all_curves.append(nexp)
  
      idx_best = np.argmin(all_chisq)
  
      curve_name = str(list_curves[idx_best])
      idx1 = curve_name.find("n_")
      idx2 = curve_name.find("at")
      curve_name = curve_name[idx1 + 2 : idx2 - 1]
  
      return curve_name
  
file_path: tsfel/tsfel/utils/calculate_complexity.py
imports: import time
  import json
  import numpy
  from scipy.optimize import curve_fit
  from tsfel.feature_extraction.features_settings import load_json
  from tsfel.feature_extraction.calc_features import calc_window_features
label_desc: Use image node_id 6 for calling a global function with example usage: find_best_curve(t, signal) and returns: curve_name