code: def check_metrics(metrics):
      """Check if custom metrics are provided.
  
      Parameters
      ----------
      metrics : list of str or classes
          List with built-in metrics (str) or custom metrics (classes).
  
      Returns
      -------
      val_metrics : list of str
          List of metric names.
  
      """
      val_metrics = []
      for metric in metrics:
          if isinstance(metric, str):
              val_metrics.append(metric)
          elif issubclass(metric, Metric):
              val_metrics.append(metric()._name)
          else:
              raise TypeError(
                  "You need to provide a valid metric format"
              )
      return val_metrics
  
imports: from dataclasses import dataclass
  from typing import List
  import numpy
  from sklearn.metrics import roc_auc_score, mean_squared_error, mean_absolute_error, accuracy_score, log_loss, balanced_accuracy_score, mean_squared_log_error
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: check_metrics(metrics) and returns: val_metrics