code: def test_recipe_list(
      search_folder="recipes",
      hparam_ext=[".yaml"],
      hparam_field="Hparam_file",
      recipe_folder="tests/recipes",
      flags_field="test_debug_flags",
      avoid_list=[
          "/models/",
          "/results/",
          "/pretrained_models/",
          "recipes/Voicebank/MTL/CoopNet/hparams/logger.yaml",
          "recipes/LibriParty/generate_dataset/dataset.yaml",
          "hpopt.yaml",
          "recipes/LJSpeech/TTS/quantization/hparams/kmeans.yaml",
          "recipes/DNS/noisyspeech_synthesizer/noisyspeech_synthesizer.yaml",
      ],
  ):
      """This test checks if all the all hparam file of all the recipes are listed
      in the csv recipe file.
  
      Arguments
      ---------
      search_folder: path
          The path where to search the hparam files.
      hparam_ext: list
          The list containing the extensions of hparam files.
      hparam_field: str
          Field of the csv file where the path of the hparam file is reported.
      recipe_folder: path
          Path of the folder containing csv recipe files.
      flags_field: str
          Field of the csv file where the debug flags are stated (for data flow testing).
      avoid_list: list
          List of files for which this check must be avoided.
  
      Returns
      ---------
      bool:
          True if the test passes, False otherwise.
  
      """
      all_diffs_zero = True
      all_with_flags = True
      for recipe_csvfile in os.listdir(recipe_folder):
          if recipe_csvfile in __skip_list:
              continue
          dataset = os.path.splitext(recipe_csvfile)[0]
          hparam_lst = get_all_files(
              os.path.join(search_folder, dataset),
              match_and=hparam_ext,
              exclude_or=avoid_list,
          )
          recipe_lst = get_list_from_csv(
              os.path.join(recipe_folder, recipe_csvfile),
              field=hparam_field,
          )
          diff_lst = list(set(hparam_lst) - set(recipe_lst))
  
          for file in diff_lst:
              print(
                  "\tERROR: The file %s is not listed in %s. Please add it. \
                      For more info see tests/consistency/README.md"
                  % (file, recipe_csvfile)
              )
  
          all_diffs_zero &= len(diff_lst) == 0
  
          flags_lst = get_list_from_csv(
              os.path.join(recipe_folder, recipe_csvfile), flags_field
          )
          for flags in flags_lst:
              if not flags:
                  all_with_flags = False
                  print(
                      f"\tERROR: {flags_field} are missing in {recipe_csvfile}"
                  )
  
      assert all_diffs_zero
      assert all_with_flags
  
imports: import os
  import csv
  from speechbrain.utils.data_utils import get_all_files, get_list_from_csv
label_desc: Use image node_id 1 for calling a global function with example usage: test_recipe_list(search_folder, hparam_ext, hparam_field, recipe_folder, flags_field, avoid_list) without return types