code: def test_api_in_sample_multi_ts_predict_correct(
      validation_blocks, task_type: str = "ts_forecasting"
  ):
      forecast_length = 2
      train_data, test_data = get_multi_ts_data(
          forecast_length=forecast_length,
          validation_blocks=validation_blocks,
      )
      model = Fedot(
          problem="ts_forecasting",
          **TESTS_MAIN_API_DEFAULT_PARAMS,
          task_params=TsForecastingParams(
              forecast_length=forecast_length
          ),
          available_operations=[
              "lagged",
              "smoothing",
              "diff_filter",
              "gaussian_filter",
              "ridge",
              "lasso",
              "linear",
              "cut",
          ],
      )
  
      model.fit(
          features=train_data,
          predefined_model=ts_complex_ridge_smoothing_pipeline(),
      )
      ts_forecast = model.predict(
          features=test_data, validation_blocks=validation_blocks
      )
      _ = model.get_metrics(
          target=test_data.target,
          metric_names="rmse",
          validation_blocks=validation_blocks,
      )
  
      assert (
          len(ts_forecast) == forecast_length * validation_blocks
          if validation_blocks
          else forecast_length * 254
      )
  
imports: import os
  import shutil
  from copy import deepcopy
  import numpy
  import pandas
  import pytest
  from golem.core.dag.graph_utils import graph_structure
  from sklearn.datasets import load_iris
  from sklearn.preprocessing import LabelEncoder
  from examples.simple.time_series_forecasting.ts_pipelines import ts_complex_ridge_smoothing_pipeline
  from fedot import Fedot
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.tasks import TsForecastingParams
  from test.data.datasets import get_dataset, get_multimodal_ts_data, load_categorical_unimodal, load_categorical_multidata
  from test.unit.common_tests import is_predict_ignores_target
  from test.unit.tasks.test_multi_ts_forecast import get_multi_ts_data
label_desc: Use image node_id 5 for calling a global function with example usage: test_api_in_sample_multi_ts_predict_correct(validation_blocks, task_type) without return types