code: def _save_figs(
      figs, metrics, *, filename_template, directory, extensions
  ):
      save_template = filename_template
      if directory is not None:
          os.makedirs(directory, exist_ok=True)
          save_template = os.path.join(directory, filename_template)
  
      for fig, metric in zip(figs, metrics):
          for ext in extensions:
              filename = save_template.format(metric=metric) + f".{ext}"
              fig.savefig(filename)
  
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 6 for calling a global function with example usage: _save_figs(figs, metrics) without return types