code: def run_class_kc2_case(is_composed: bool = False, path_to_save=None):
      train_data, test_data = get_kc2_data()
      task = Task(TaskTypesEnum.classification)
      # the choice of the metric for the pipeline quality assessment during composition
      metric_function = MetricsRepository.get_metric(
          ClassificationMetricsEnum.ROCAUC_penalty
      )
  
      if is_composed:
          case = "kc2_composed"
          run_analysis_case(
              train_data,
              test_data,
              case,
              task,
              metric=metric_function,
              is_composed=True,
              result_path=path_to_save,
          )
      else:
          case = "kc2"
          run_analysis_case(
              train_data,
              test_data,
              case,
              task,
              metric=metric_function,
              is_composed=False,
              result_path=path_to_save,
          )
  
imports: from os import makedirs
  from os.path import exists, join
  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 examples.simple.classification.classification_pipelines import classification_three_depth_manual_pipeline
  from examples.simple.regression.regression_pipelines import regression_three_depth_manual_pipeline
  from fedot.core.composer.composer_builder import ComposerBuilder
  from fedot.core.data.data import InputData
  from fedot.core.data.data_split import train_test_data_setup
  from fedot.core.repository.operation_types_repository import get_operations_for_task
  from fedot.core.repository.metrics_repository import ClassificationMetricsEnum, MetricsRepository, RegressionMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import default_fedot_data_dir, fedot_project_root
  from fedot.structural_analysis.node_sa_approaches import NodeDeletionAnalyze, NodeReplaceOperationAnalyze
  from fedot.structural_analysis.nodes_sensitivity import NodesAnalysis
label_desc: Use image node_id 8 for calling a global function with example usage: run_class_kc2_case(is_composed, path_to_save) without return types