code: def _infer_metrics(history, metrics):
      if metrics is None:
          if pd is not None and isinstance(history, pd.DataFrame):
              cols = list(history.columns)
          else:
              cols = list(history[0].keys())
          metrics = [
              col
              for col in cols
              if col != "epoch" and not col.startswith("val_")
          ]
      return metrics
  
file_path: poutyne/poutyne/plotting.py
imports: import itertools
  import os
  from typing import Any, Dict, List, Optional, Tuple, Union
  from poutyne.utils import is_in_jupyter_notebook
label_desc: Use image node_id 4 for calling a global function with example usage: _infer_metrics(history, metrics) and returns: metrics