code: def get_composed_pipeline(dataset_to_compose, task, metric_function):
      # the search of the models provided by the framework that can be used as nodes in a pipeline for the selected task
      available_model_types = get_operations_for_task(
          task=task, mode="model"
      )
  
      # the choice and initialisation of the GP search
      composer_requirements = PipelineComposerRequirements(
          primary=available_model_types,
          secondary=available_model_types,
      )
      params = GPAlgorithmParameters(
          genetic_scheme_type=GeneticSchemeTypesEnum.steady_state
      )
  
      # Create composer and with required composer params
      composer = (
          ComposerBuilder(task=task)
          .with_requirements(composer_requirements)
          .with_optimizer_params(params)
          .with_metrics(metric_function)
          .build()
      )
  
      # the optimal pipeline generation by composition - the most time-consuming task
      pipeline_evo_composed = composer.compose_pipeline(
          data=dataset_to_compose
      )
  
      return pipeline_evo_composed
  
file_path: FEDOT/examples/advanced/structural_analysis/pipelines_access.py
imports: from golem.core.optimisers.genetic.gp_params import GPAlgorithmParameters
  from golem.core.optimisers.genetic.operators.inheritance import GeneticSchemeTypesEnum
  from fedot.core.pipelines.pipeline_composer_requirements import PipelineComposerRequirements
  from fedot.core.composer.composer_builder import ComposerBuilder
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.repository.operation_types_repository import get_operations_for_task
label_desc: Use image node_id 3 for calling a global function with example usage: get_composed_pipeline(dataset_to_compose, task, metric_function) and returns: pipeline_evo_composed