code: def _load_custom_metrics(
      recipe_root: str, metrics: List[RecipeMetric]
  ) -> List[EvaluationMetric]:
      custom_metrics = [
          metric
          for metric in metrics
          if metric.custom_function is not None
      ]
      if not custom_metrics:
          return None
  
      try:
          sys.path.append(recipe_root)
          custom_metrics_mod = importlib.import_module(
              "steps.custom_metrics"
          )
          return [
              make_metric(
                  eval_fn=getattr(
                      custom_metrics_mod, custom_metric.custom_function
                  ),
                  name=custom_metric.name,
                  greater_is_better=custom_metric.greater_is_better,
              )
              for custom_metric in custom_metrics
          ]
      except Exception as e:
          raise MlflowException(
              message="Failed to load custom metric functions",
              error_code=BAD_REQUEST,
          ) from e
  
file_path: mlflow/mlflow/recipes/utils/metrics.py
imports: import importlib
  import logging
  import sys
  from typing import Any, Dict, List, Optional
  from mlflow.exceptions import BAD_REQUEST, MlflowException
  from mlflow.models import EvaluationMetric, make_metric
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
label_desc: Use image node_id 8 for calling a global function with example usage: _load_custom_metrics(recipe_root, metrics) and returns: None, unknown