code: def compute_complexity(feature, domain, json_path, **kwargs):
      """Computes the feature complexity.
  
      Parameters
      ----------
      feature : string
          Feature name
      domain : string
          Feature domain
      json_path: json
          Features json file
      \**kwargs:
      See below:
          * *features_path* (``string``) --
              Directory of script with personal features
  
      Returns
      -------
      int
          Feature complexity
  
      Writes complexity in json file
  
      """
  
      dictionary = load_json(json_path)
  
      features_path = kwargs.get("features_path", None)
  
      # The inputs from this function should be replaced by a dictionary
      one_feat_dict = {domain: {feature: dictionary[domain][feature]}}
  
      t = np.logspace(3.0, 5.0, 6)
      signal, s = [], []
      f = 0.05
      x = np.arange(0, t[-1] + 1, 1)
      fs = 100
      wave = np.sin(2 * np.pi * f * x / fs)
  
      for ti in t:
          for _ in range(20):
              start = time.time()
              calc_window_features(
                  one_feat_dict,
                  wave[: int(ti)],
                  fs,
                  features_path=features_path,
              )
              end = time.time()
  
              s += [end - start]
  
          signal += [np.mean(s)]
  
      curve_name = find_best_curve(t, signal)
      dictionary[domain][feature]["complexity"] = curve_name
  
      with open(json_path, "w") as write_file:
          json.dump(dictionary, write_file, indent=4, sort_keys=True)
  
      if curve_name == "constant" or curve_name == "log":
          return 1
      elif curve_name == "linear":
          return 2
      elif curve_name == "nlog" or curve_name == "squared":
          return 3
      else:
          return 0
  
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 7 for calling a global function with example usage: compute_complexity(feature, domain, json_path) and returns: int, int, int, int