code: def run_single(
      train_data,
      test_data,
      mutation_types,
      crossover_types,
      timeout: Optional[float] = 10,
      num_generations: int = 20,
      visualize: bool = False,
  ):
      task = Task(TaskTypesEnum.classification)
      ops = get_operations_for_task(task)
      requirements = PipelineComposerRequirements(
          primary=ops,
          secondary=ops,
          num_of_generations=num_generations,
          timeout=timedelta(minutes=timeout) if timeout else None,
          early_stopping_iterations=None,
          n_jobs=-1,
      )
      gp_params = GPAlgorithmParameters(
          genetic_scheme_type=GeneticSchemeTypesEnum.generational,
          mutation_types=mutation_types,
          crossover_types=crossover_types,
      )
  
      composer = (
          ComposerBuilder(task=Task(TaskTypesEnum.classification))
          .with_metrics(ClassificationMetricsEnum.ROCAUC)
          .with_requirements(requirements)
          .with_optimizer_params(gp_params)
          .build()
      )
  
      pipeline = composer.compose_pipeline(train_data)
      pipeline.fit_from_scratch(train_data)
      predicted = pipeline.predict(test_data)
  
      roc_auc_metric = roc_auc(
          y_true=test_data.target, y_score=predicted.predict
      )
      print("roc_auc=", roc_auc_metric)
  
      if visualize:
          pipeline.show()
          composer.history.show.fitness_line()
  
      return composer.history
  
imports: import os
  from datetime import timedelta
  from typing import Sequence, Optional
  import numpy
  from matplotlib import pyplot
  from sklearn.metrics import roc_auc_score
  from fedot.core.composer.composer_builder import ComposerBuilder
  from fedot.core.data.data import InputData
  from golem.core.optimisers.genetic.gp_params import GPAlgorithmParameters
  from golem.core.optimisers.genetic.operators.crossover import CrossoverTypesEnum
  from golem.core.optimisers.genetic.operators.inheritance import GeneticSchemeTypesEnum
  from golem.core.optimisers.genetic.operators.mutation import MutationTypesEnum
  from golem.core.optimisers.opt_history_objects.opt_history import OptHistory
  from fedot.core.pipelines.pipeline_composer_requirements import PipelineComposerRequirements
  from fedot.core.repository.operation_types_repository import get_operations_for_task
  from fedot.core.repository.metrics_repository import ClassificationMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import fedot_project_root
label_desc: Use image node_id 1 for calling a global function with example usage: run_single(train_data, test_data, mutation_types, crossover_types, timeout, num_generations, visualize) and returns: composer