code: def test_synthetic_regression_automl():
      """
      This test compares that pre-known optimal pipeline is can be found by composer.
      If correct, the best fitness should be close to 0.
      """
  
      ref_pipeline = get_regression_pipeline()
      input_data = get_regression_data()
  
      train_data, test_data = train_test_data_setup(input_data)
  
      metric_func = partial(
          custom_metric_for_synt_data,
          fit_data=train_data,
          predict_data=test_data,
      )
  
      # generate synthetic target
      ref_pipeline.fit(train_data)
      ground_truth = ref_pipeline.predict(test_data)
      test_data.target = ground_truth.predict
  
      # run automl
      auto_model = Fedot(
          problem="regression",
          logging_level=logging.DEBUG,
          timeout=1,
          metric=metric_func,
          cv_folds=None,
          available_operations=[
              "scaling",
              "normalization",
              "pca",
              "ridge",
              "linear",
          ],
          preset="best_quality",
          with_tuning=False,
      )
      auto_model.fit(train_data)
  
      assert min(auto_model.history.historical_fitness[-1]) < 0.01
  
file_path: FEDOT/test/integration/quality/test_synthetic_tasks.py
imports: import logging
  import os
  from functools import partial
  from sklearn.metrics import mean_squared_error
  from fedot import Fedot
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from test.integration.composer.test_composer import to_categorical_codes
label_desc: Use image node_id 5 for calling a global function with example usage: test_synthetic_regression_automl() without return types