code: def check_stack(new_items, stack):
      """Check if new items can safely be stacked onto old items"""
      names = [st.name for st in stack]
      for item in new_items:
          if item.name in names:
              raise ValueError(
                  "Name (%s) already exists in stack. "
                  "Rename before attempting to push." % item.name
              )
  
file_path: mlens/mlens/parallel/_base_functions.py
imports: from __future__ import division
  import os
  import warnings
  from scipy.sparse import issparse
  import numpy
  from ..utils import pickle_load, pickle_save, load
  from ..utils.exceptions import MetricWarning, ParameterChangeWarning
label_desc: Use image node_id 13 for calling a global function with example usage: check_stack(new_items, stack) without return types