code: def extract_metric(result, dataset, metric):
      dataset_col = result.loc[result["Dataset"] == dataset]
      metric_col = dataset_col.loc[dataset_col["Metric"] == metric]
      if len(metric_col) == 1:
          return metric_col["Value"].iloc[0]
      else:
          return metric_col["Value"].mean()
  
imports: import re
  from typing import List
  import numpy
  from hamcrest import assert_that, calling, close_to, equal_to, greater_than, has_items, has_length, instance_of, raises
  from sklearn.ensemble import AdaBoostClassifier, RandomForestClassifier
  from sklearn.metrics import jaccard_score, make_scorer
  from sklearn.model_selection import train_test_split
  from deepchecks.core import ConditionResult
  from deepchecks.core.errors import DatasetValidationError, DeepchecksNotSupportedError, DeepchecksValueError, ModelValidationError
  from deepchecks.tabular.checks.model_evaluation import TrainTestPerformance
  from deepchecks.tabular.dataset import Dataset
  from deepchecks.tabular.metric_utils.scorers import DEFAULT_REGRESSION_SCORERS, MULTICLASS_SCORERS_NON_AVERAGE
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 1 for calling a global function with example usage: extract_metric(result, dataset, metric) and returns: metric_col, metric_col