code: def test_api_cv_correct():
      """Checks if the composer works correctly when using cross validation for
      time series through api"""
      folds = 2
      (
          forecast_len,
          validation_blocks,
          time_series,
      ) = configure_experiment()
      timeout = 0.05
      composer_params = {
          "max_depth": 2,
          "max_arity": 2,
          "preset": "fast_train",
          "cv_folds": folds,
          "num_of_generations": 1,
          "show_progress": False,
      }
      task_parameters = TsForecastingParams(
          forecast_length=forecast_len
      )
  
      model = Fedot(
          problem="ts_forecasting",
          timeout=timeout,
          task_params=task_parameters,
          logging_level=logging.DEBUG,
          **composer_params,
      )
      fedot_model = model.fit(features=time_series)
      assert fedot_model is not None
  
imports: import datetime
  import logging
  from hyperopt import hp
  from golem.core.log import default_log
  from golem.core.optimisers.genetic.gp_params import GPAlgorithmParameters
  from golem.core.tuning.simultaneous import SimultaneousTuner
  from fedot.core.pipelines.pipeline_composer_requirements import PipelineComposerRequirements
  from examples.advanced.time_series_forecasting.composing_pipelines import get_available_operations
  from fedot import Fedot
  from fedot.core.composer.composer_builder import ComposerBuilder
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.metrics_repository import MetricsRepository, RegressionMetricsEnum
  from fedot.core.repository.tasks import TsForecastingParams
  from fedot.core.pipelines.tuning.search_space import PipelineSearchSpace
  from fedot.core.data.cv_folds import cv_generator
  from test.unit.tasks.test_forecasting import get_simple_ts_pipeline, get_ts_data
label_desc: Use image node_id 5 for calling a global function with example usage: test_api_cv_correct() without return types