code: def skip(save_folder, conf, meta_files, opt_file):
      """
      Detects if the AMI data_preparation has been already done.
      If the preparation has been done, we can skip it.
  
      Returns
      -------
      bool
          if True, the preparation phase can be skipped.
          if False, it must be done.
      """
      # Checking if meta (json) files are available
      skip = True
      for file_path in meta_files:
          if not os.path.isfile(file_path):
              skip = False
  
      # Checking saved options
      save_opt_file = os.path.join(save_folder, opt_file)
      if skip is True:
          if os.path.isfile(save_opt_file):
              opts_old = load_pkl(save_opt_file)
              if opts_old == conf:
                  skip = True
              else:
                  skip = False
          else:
              skip = False
  
      return skip
  
file_path: speechbrain/recipes/AMI/ami_prepare.py
imports: import os
  import logging
  import xml.etree.ElementTree
  import glob
  import json
  from ami_splits import get_AMI_split
  from speechbrain.dataio.dataio import load_pkl, save_pkl
label_desc: Use image node_id 8 for calling a global function with example usage: skip(save_folder, conf, meta_files, opt_file) and returns: skip