code: def time_series_features_extractor(
      dict_features, signal_windows, fs=None, verbose=1, **kwargs
  ):
      """Extraction of time series features.
  
      Parameters
      ----------
      dict_features : dict
          Dictionary with features
      signal_windows: list
          Input from which features are computed, window
      fs : int or None
          Sampling frequency
      verbose : int
          Verbosity mode. 0 = silent, 1 = progress bar.
          (0 or 1 (Default))
      \**kwargs:
      See below:
          * *window_size* (``int``) --
              Window size in number of samples
              (default: ``100``)
  
          * *overlap* (``float``) --
              Overlap between 0 and 1
              (default: ``0``)
  
          * *features_path* (``string``) --
              Directory of script with personal features
  
          * *header_names* (``list or array``) --
              Names of each column window
  
          * *n_jobs* (``int``) --
              The number of jobs to run in parallel. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
              ``-1`` means using all processors.
              (default: ``None`` in Windows and ``-1`` for other systems)
  
      Returns
      -------
      DataFrame
          Extracted features
  
      """
      if verbose == 1:
          print("*** Feature extraction started ***")
  
      window_size = kwargs.get("window_size", None)
      overlap = kwargs.get("overlap", 0)
      features_path = kwargs.get("features_path", None)
      names = kwargs.get("header_names", None)
  
      # Choosing default of n_jobs by operating system
      if sys.platform[:-2] == "win":
          n_jobs_default = None
      else:
          n_jobs_default = -1
  
      # Choosing default of n_jobs by python interface
      if (
          get_ipython().__class__.__name__ == "ZMQInteractiveShell"
          or get_ipython().__class__.__name__ == "Shell"
      ):
          n_jobs_default = -1
  
      n_jobs = kwargs.get("n_jobs", n_jobs_default)
  
      if fs is None:
          warnings.warn(
              "Using default sampling frequency set in configuration file.",
              stacklevel=2,
          )
  
      if names is not None:
          names = list(names)
      else:
          # Name of each column to be concatenated with feature name
          if isinstance(signal_windows, pd.DataFrame):
              names = signal_windows.columns.values
          elif isinstance(signal_windows[0], pd.DataFrame):
              names = signal_windows[0].columns.values
  
      if window_size is not None:
          signal_windows = signal_window_splitter(
              signal_windows, window_size, overlap
          )
  
      if len(signal_windows) == 0:
          raise SystemExit(
              "Empty signal windows. Please check window size input parameter."
          )
  
      features_final = pd.DataFrame()
  
      if isinstance(signal_windows, list) and isinstance(
          signal_windows[0], numbers.Real
      ):
          signal_windows = np.array(signal_windows)
  
      # more than one window
      if isinstance(signal_windows, list):
          # Starting the display of progress bar for notebooks interfaces
          if (
              get_ipython().__class__.__name__ == "ZMQInteractiveShell"
          ) or (get_ipython().__class__.__name__ == "Shell"):
              out = display(
                  progress_bar_notebook(0, len(signal_windows)),
                  display_id=True,
              )
          else:
              out = None
  
          if isinstance(n_jobs, int):
              # Multiprocessing use
              if n_jobs == -1:
                  cpu_count = mp.cpu_count()
              else:
                  cpu_count = n_jobs
  
              pool = mp.Pool(cpu_count)
              features = pool.imap(
                  partial(
                      calc_features,
                      dict_features=dict_features,
                      fs=fs,
                      features_path=features_path,
                      header_names=names,
                  ),
                  signal_windows,
              )
  
              for i, feat in enumerate(features):
                  if verbose == 1:
                      display_progress_bar(i, len(signal_windows), out)
                  features_final = pd.concat(
                      [features_final, feat], axis=0
                  )
  
              pool.close()
              pool.join()
  
          elif n_jobs is None:
              for i, feat in enumerate(signal_windows):
                  features_final = pd.concat(
                      [
                          features_final,
                          calc_window_features(
                              dict_features,
                              feat,
                              fs,
                              features_path=features_path,
                              header_names=names,
                          ),
                      ],
                      axis=0,
                  )
                  if verbose == 1:
                      display_progress_bar(i, len(signal_windows), out)
          else:
              raise SystemExit(
                  "n_jobs value is not valid. "
                  "Choose an integer value or None for no multiprocessing."
              )
      # single window
      else:
          features_final = calc_window_features(
              dict_features,
              signal_windows,
              fs,
              verbose=verbose,
              features_path=features_path,
              header_names=names,
              single_window=True,
          )
  
      if verbose == 1:
          print("\n" + "*** Feature extraction finished ***")
  
      # Assuring the same feature extraction order
      features_final = features_final.reindex(
          sorted(features_final.columns), axis=1
      )
      return features_final.reset_index(drop=True)
  
file_path: tsfel/tsfel/feature_extraction/calc_features.py
imports: import glob
  import importlib
  import multiprocessing
  import numbers
  import os
  import pathlib
  import sys
  import warnings
  from functools import partial
  from pathlib import Path
  import numpy
  import pandas
  from IPython import get_ipython
  from IPython.display import display
  from tsfel.utils.progress_bar import display_progress_bar, progress_bar_notebook
  from tsfel.utils.signal_processing import merge_time_series, signal_window_splitter
label_desc: Use image node_id 3 for calling a global function with example usage: time_series_features_extractor(dict_features, signal_windows, fs, verbose) and returns: features_final