code: def calculate_validation_metric(
      pipeline: Pipeline, dataset_to_validate: InputData
  ) -> float:
      # the execution of the obtained composite models
      predicted = pipeline.predict(dataset_to_validate)
      # the quality assessment for the simulation results
      roc_auc_value = roc_auc(
          y_true=dataset_to_validate.target, y_score=predicted.predict
      )
      return roc_auc_value
  
imports: import datetime
  from golem.core.optimisers.genetic.gp_params import GPAlgorithmParameters
  from golem.core.optimisers.genetic.operators.inheritance import GeneticSchemeTypesEnum
  from golem.core.optimisers.genetic.operators.selection import SelectionTypesEnum
  from golem.core.tuning.sequential import SequentialTuner
  from golem.visualisation.opt_viz_extra import OptHistoryExtraVisualizer
  from sklearn.metrics import roc_auc_score
  from cases.credit_scoring.credit_scoring_problem import get_scoring_data
  from fedot.core.composer.composer_builder import ComposerBuilder
  from fedot.core.data.data import InputData
  from fedot.core.pipelines.node import PipelineNode
  from fedot.core.pipelines.pipeline import Pipeline
  from fedot.core.pipelines.pipeline_composer_requirements import PipelineComposerRequirements
  from fedot.core.pipelines.tuning.tuner_builder import TunerBuilder
  from fedot.core.repository.operation_types_repository import get_operations_for_task
  from fedot.core.repository.metrics_repository import ClassificationMetricsEnum, ComplexityMetricsEnum
  from fedot.core.repository.tasks import Task, TaskTypesEnum
  from fedot.core.utils import set_random_seed
label_desc: Use image node_id 2 for calling a global function with example usage: calculate_validation_metric(pipeline, dataset_to_validate) and returns: roc_auc_value