code: def get_ts_data(
      n_steps: int = 80,
      forecast_length: int = 5,
      validation_blocks: Optional[int] = None,
  ):
      """Prepare data from csv file with time series and take needed number of
      elements
  
      :param n_steps: number of elements in time series to take
      :param forecast_length: the length of forecast
      :param validation_blocks: number of validation blocks
      """
      file_path = fedot_project_root().joinpath(
          "test/data/simple_time_series.csv"
      )
      df = pd.read_csv(file_path)
  
      time_series = np.array(df["sea_height"])[:n_steps]
      task = Task(
          TaskTypesEnum.ts_forecasting,
          TsForecastingParams(forecast_length=forecast_length),
      )
  
      data = InputData(
          idx=np.arange(0, len(time_series)),
          features=time_series,
          target=time_series,
          task=task,
          data_type=DataTypesEnum.ts,
      )
      return train_test_data_setup(
          data, validation_blocks=validation_blocks
      )
  
imports: from copy import deepcopy
  from typing import Optional
  import numpy
  import pandas
  import pytest
  from scipy import stats
  from sklearn.metrics import mean_absolute_error, mean_squared_error
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.operations.evaluation.operation_implementations.models.ts_implementations.arima import ARIMAImplementation
  from fedot.core.operations.evaluation.operation_implementations.models.ts_implementations.statsmodels import AutoRegImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.ts_wrappers import in_sample_ts_forecast, out_of_sample_ts_forecast
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from fedot.core.utils import fedot_project_root
  from fedot.utilities.synth_dataset_generator import generate_synthetic_data
label_desc: Use image node_id 2 for calling a global function with example usage: get_ts_data(n_steps, forecast_length, validation_blocks) and returns: train_test_data_setup