code: def print_metrics(metrics, y_true, y_pred, tag, return_dict=False):
      if isinstance(y_true, pd.DataFrame) or isinstance(
          y_true, pd.Series
      ):
          y_true = y_true.values
      if isinstance(y_pred, pd.DataFrame) or isinstance(
          y_pred, pd.Series
      ):
          y_pred = y_pred.values
      if y_true.ndim > 1:
          y_true = y_true.ravel()
      if y_pred.ndim > 1:
          y_pred = y_pred.ravel()
      print_str_l = []
      res_d = {}
      for metric, name, params in metrics:
          score = metric(y_true, y_pred, **params)
          print_str_l.append(f"{tag} {name}: {score}")
          res_d[name] = score
      print((" | ".join(print_str_l)).strip())
      if return_dict:
          return res_d
  
file_path: pytorch_tabular/src/pytorch_tabular/utils/data_utils.py
imports: import gzip
  import os
  import random
  import shutil
  import numpy
  import pandas
  import requests
  import torch
  from pandas import DataFrame, Series
  from sklearn.cluster import KMeans
  from sklearn.datasets import make_classification, make_regression
  from sklearn.preprocessing import LabelEncoder
  from .logger import get_logger
label_desc: Use image node_id 6 for calling a global function with example usage: print_metrics(metrics, y_true, y_pred, tag, return_dict) and returns: res_d