code: def check_files(
      check_str,
      output_folder,
      recipe_id,
      pattern=r"file_exists=\[(.*?)\]",
  ):
      """Checks if the output folder created by the test has the expected files.
  
      Arguments
      ---------
      check_str: str
          String summarizing the checks to perform.
      output_folder: path
          The path where to check the files.
      recipe_id: str
          Unique ID of the recipe.
      pattern: str
          The pattern used to extract the list of files to check from check_str.
  
      Returns
      ---------
      check: bool
          True if all the files are found, False otherwise.
      """
  
      check = True
      files_to_check = re.search(pattern, check_str)
      files_to_check = files_to_check.group(1).split(",")
  
      for file_to_check in files_to_check:
          check_path = os.path.join(output_folder, file_to_check)
          if not (os.path.exists(check_path)):
              print(
                  "\tERROR: The recipe %s does not contain the expected file %s"
                  % (recipe_id, check_path)
              )
              check = False
      return check
  
file_path: speechbrain/tests/utils/recipe_tests.py
imports: import os
  import re
  import csv
  import sys
  import pydoc
  from time import time
  import subprocess
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.data_utils import download_file
label_desc: Use image node_id 3 for calling a global function with example usage: check_files(check_str, output_folder, recipe_id, pattern) and returns: check