code: def _assert_list_length_with_num_metrics(list_, metrics, name):
      if list_ is not None and len(list_) != len(metrics):
          raise ValueError(
              f"A {name} was not provided for each metric. Got {len(list_)} {name}s for {len(metrics)} 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 3 for calling a global function with example usage: _assert_list_length_with_num_metrics(list_, metrics, name) without return types