code: def get_output_timeseries(
      len_forecast=5, length=100, num_variables=1, for_predict=False
  ):
      """Function returns time series for time series forecasting task"""
      synthetic_ts = generate_synthetic_data(length=length)
  
      features = synthetic_ts
      if num_variables > 1:
          # Multivariate timeseries
          features = np.hstack(
              [features.reshape(-1, 1)] * num_variables
          )
      task = Task(
          TaskTypesEnum.ts_forecasting,
          TsForecastingParams(forecast_length=len_forecast),
      )
  
      if for_predict:
          start_forecast = len(synthetic_ts)
          end_forecast = start_forecast + len_forecast
          idx = np.arange(start_forecast, end_forecast)
          predict = features[-len_forecast:]
      else:
          idx = np.arange(0, length)
          predict = features
  
      predict_output = OutputData(
          idx,
          task,
          DataTypesEnum.ts,
          features=features,
          predict=predict,
      )
      return predict_output
  
file_path: FEDOT/test/unit/data/test_data_merge_ts.py
imports: from itertools import product
  import numpy
  import pytest
  from fedot.core.data.data import OutputData
  from fedot.core.data.merge.data_merger import DataMerger
  from fedot.core.pipelines.pipeline_builder import PipelineBuilder
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from fedot.utilities.synth_dataset_generator import generate_synthetic_data
  from test.unit.data_operations.test_data_operations_implementations import get_time_series
label_desc: Use image node_id 2 for calling a global function with example usage: get_output_timeseries(len_forecast, length, num_variables, for_predict) and returns: predict_output