code: def test_composer_cv_correct():
      """Checks if the composer works correctly when using cross validation for
      time series"""
      (
          forecast_len,
          validation_blocks,
          time_series,
      ) = configure_experiment()
  
      (
          primary_operations,
          secondary_operations,
      ) = get_available_operations()
  
      # Composer parameters
      composer_requirements = PipelineComposerRequirements(
          primary=primary_operations,
          secondary=secondary_operations,
          num_of_generations=2,
          timeout=datetime.timedelta(seconds=5),
          cv_folds=2,
          show_progress=False,
      )
      parameters = GPAlgorithmParameters(
          pop_size=2,
          crossover_prob=0.8,
          mutation_prob=0.8,
      )
  
      init_pipeline = get_simple_ts_pipeline()
      metric_function = MetricsRepository.get_metric(
          RegressionMetricsEnum.RMSE
      )
      builder = (
          ComposerBuilder(task=time_series.task)
          .with_optimizer_params(parameters)
          .with_requirements(composer_requirements)
          .with_metrics(metric_function)
          .with_initial_pipelines([init_pipeline])
      )
      composer = builder.build()
  
      obtained_pipeline = composer.compose_pipeline(data=time_series)
      assert isinstance(obtained_pipeline, Pipeline)
  
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 4 for calling a global function with example usage: test_composer_cv_correct() without return types