class_docstr: Genetic programming based composer
  
  :param optimizer: optimizer generated in ComposerBuilder.
  :param composer_requirements: requirements for composition process.
  :param pipelines_cache: Cache manager for fitted models, optional.
  :param preprocessing_cache: Cache manager for optional preprocessing encoders and imputers, optional.
class_docstr_tok: ["Genetic","programming","based","composer",":","param","optimizer",":","optimizer","generated","in","ComposerBuilder",".",":","param","composer_requirements",":","requirements","for","composition","process",".",":","param","pipelines_cache",":","Cache","manager","for","fitted","models",",","optional",".",":","param","preprocessing_cache",":","Cache","manager","for","optional","preprocessing","encoders","and","imputers",",","optional","."]
code: def _convert_opt_results_to_pipeline(
      self, opt_result: Sequence[OptGraph]
  ) -> Tuple[Optional[Pipeline], Sequence[Pipeline]]:
      adapter = self.optimizer.graph_generation_params.adapter
      multi_objective = self.optimizer.objective.is_multi_objective
      best_pipelines = [adapter.restore(graph) for graph in opt_result]
      if not best_pipelines:
          return None, []
      chosen_best_pipeline = (
          best_pipelines if multi_objective else best_pipelines[0]
      )
      return chosen_best_pipeline, best_pipelines
  
file_path: FEDOT/fedot/core/composer/gp_composer/gp_composer.py
imports: from typing import Collection, Optional, Sequence, Tuple, Union
  from golem.core.optimisers.graph import OptGraph
  from golem.core.optimisers.optimizer import GraphOptimizer
  from fedot.core.caching.pipelines_cache import OperationsCache
  from fedot.core.caching.preprocessing_cache import PreprocessingCache
  from fedot.core.composer.composer import Composer
  from fedot.core.data.data import InputData
  from fedot.core.data.multi_modal import MultiModalData
  from fedot.core.optimisers.objective.data_objective_eval import PipelineObjectiveEvaluate
  from fedot.core.optimisers.objective.data_source_splitter import DataSourceSplitter
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.pipeline_composer_requirements import PipelineComposerRequirements
label_desc: Use image node_id 3 for calling the GPComposer obj's underlying member method code with example usage: obj._convert_opt_results_to_pipeline(opt_result) and returns: chosen_best_pipeline,  best_pipelines, None,  list