code: def _get_custom_metrics(
      step_config: Dict, ext_task: str
  ) -> List[Dict]:
      """
      :param: Configuration dictionary for the train or evaluate step.
      :return: A list of custom metrics defined in the specified configuration dictionary,
               or an empty list of the configuration dictionary does not define any custom metrics.
      """
      custom_metric_dicts = step_config.get("custom_metrics", [])
      custom_metrics = [
          RecipeMetric.from_custom_metric_dict(metric_dict)
          for metric_dict in custom_metric_dicts
      ]
      custom_metric_names = {metric.name for metric in custom_metrics}
      builtin_metric_names = {
          metric.name for metric in _get_builtin_metrics(ext_task)
      }
      overridden_builtin_metrics = custom_metric_names.intersection(
          builtin_metric_names
      )
      if overridden_builtin_metrics:
          _logger.warning(
              "Custom metrics override the following built-in metrics: %s",
              sorted(overridden_builtin_metrics),
          )
      return custom_metrics
  
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 7 for calling a global function with example usage: _get_custom_metrics(step_config, ext_task) and returns: custom_metrics