code: def _get_metrics(
      metrics,
      df,
      last_n,
      skip_first_n,
      skip_last_n,
  ):
      values = [
          _prune(df[metric], last_n, skip_first_n, skip_last_n)
          for metric in metrics
      ]
  
      empty = {0: 0, 1: 0, 2: 0}
      if len(values) > 0:
          values = np.stack(values)
  
          keys, counts = np.unique(values, return_counts=True)
          counts = dict(zip(keys, counts))
          empty.update(counts)
      empty["total"] = empty[0] + empty[1] + empty[2]
      empty["n_zero"] = sum(empty[i] == 0 for i in range(3))
      return empty
  
file_path: popmon/popmon/visualization/overview_section.py
imports: from __future__ import annotations
  from datetime import datetime
  import numpy
  import pandas
  from tqdm import tqdm
  from popmon.base import Module
  from popmon.config import Report
  from popmon.resources import templates_env
  from popmon.utils import filter_metrics
  from popmon.version import version
  from popmon.visualization.utils import _prune, get_reproduction_table, get_summary_table
label_desc: Use image node_id 2 for calling a global function with example usage: _get_metrics(metrics, df, last_n, skip_first_n, skip_last_n) and returns: empty