code: def run_tuning_comparison(
      n_repits=10, ts_size=1000, forecast_length=50, visualization=True
  ):
      file_path = os.path.join(
          str(fedot_project_root()),
          "cases/data/time_series/temperature.csv",
      )
      df = pd.read_csv(file_path)
      time_series = np.array(df["value"])[:ts_size]
  
      # Train/test split
      train_part = time_series[:-forecast_length]
      test_part = time_series[-forecast_length:]
  
      # Prepare data for train and test
      train_input, predict_input, task = prepare_train_test_input(
          train_part, forecast_length
      )
  
      nodes_names = ["sparse_lagged", "lagged"]
      for name in nodes_names:
          # set lists for data collecting
          time_list = []
          mae_no_tuning = []
          mae_tuning = []
  
          test_part = np.ravel(test_part)
          # tuning calculations for averaging
          for i in range(n_repits):
              pipeline = ts_complex_dtreg_pipeline(name)
              (
                  amount_of_seconds,
                  mae_before,
                  mae_after,
              ) = run_tuning_test(
                  pipeline, train_input, predict_input, test_part, task
              )
              time_list.append(amount_of_seconds)
              mae_no_tuning.append(mae_before)
              mae_tuning.append(mae_after)
  
          if visualization:
              visualize(mae_tuning, mae_no_tuning, time_list, name)
  
          print(f"Mean time: {np.array(time_list).mean()}")
          print(
              f"Mean MAE without tuning: {np.array(mae_no_tuning).mean()}"
          )
          print(f"Mean MAE with tuning: {np.array(mae_tuning).mean()}")
  
file_path: FEDOT/examples/advanced/time_series_forecasting/sparse_lagged_tuning.py
imports: import os
  import timeit
  import warnings
  import matplotlib.pyplot
  import numpy
  import pandas
  from golem.core.tuning.simultaneous import SimultaneousTuner
  from sklearn.metrics import mean_absolute_error
  from examples.simple.time_series_forecasting.ts_pipelines import ts_complex_dtreg_pipeline
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.metrics_repository import RegressionMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from fedot.core.utils import fedot_project_root
label_desc: Use image node_id 4 for calling a global function with example usage: run_tuning_comparison(n_repits, ts_size, forecast_length, visualization) without return types