code: def prepare_input_data(
      len_forecast,
      train_data_features,
      train_data_target,
      test_data_features,
  ):
      """Function return prepared data for fit and predict
  
      :param len_forecast: forecast length
      :param train_data_features: time series which can be used as predictors for train
      :param train_data_target: time series which can be used as target for train
      :param test_data_features: time series which can be used as predictors for prediction
  
      :return train_input: Input Data for fit
      :return predict_input: Input Data for predict
      :return task: Time series forecasting task with parameters
      """
  
      task = Task(
          TaskTypesEnum.ts_forecasting,
          TsForecastingParams(forecast_length=len_forecast),
      )
  
      train_input = InputData(
          idx=np.arange(0, len(train_data_features)),
          features=train_data_features,
          target=train_data_target,
          task=task,
          data_type=DataTypesEnum.ts,
      )
  
      start_forecast = len(train_data_features)
      end_forecast = start_forecast + len_forecast
      predict_input = InputData(
          idx=np.arange(start_forecast, end_forecast),
          features=test_data_features,
          target=None,
          task=task,
          data_type=DataTypesEnum.ts,
      )
  
      return train_input, predict_input, task
  
file_path: FEDOT/examples/advanced/time_series_forecasting/nemo.py
imports: import warnings
  import numpy
  import pandas
  from sklearn.metrics import mean_squared_error, mean_absolute_error, mean_absolute_percentage_error
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.data.data import InputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
  from copy import deepcopy
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_input_data(len_forecast, train_data_features, train_data_target, test_data_features) and returns: train_input,  predict_input,  task