code: def check_and_prepare_dataset(
      data_folder, data_name, prepare_function, dictonary, seed
  ):
      """check if the preparation is done, do it if not
  
      Args:
          data_folder (str): path to dataset
          data_name (str): name of the dataset
          prepare_function (function): the preparation function
          dictonary (dict): the overall dictionary to be updated
          seed (int): the random seed for reproduction
      """
      if data_folder is not None:
          if not os.path.exists(
              os.path.join(data_folder, f"{data_name}.json")
          ):
              data = prepare_function(
                  data_folder,
                  os.path.join(data_folder, f"{data_name}.json"),
                  seed,
              )
          else:
              json_path = os.path.join(data_folder, data_name + ".json")
              logger.info(
                  f"{json_path} exists, skipping f{data_name} preparation."
              )
              with open(json_path, "r") as f:
                  data = json.load(f)
          dictonary.update(data.items())
      else:
          logger.info(f"{data_name} is not used in this exp.")
  
file_path: speechbrain/recipes/ZaionEmotionDataset/emotion_diarization/zed_prepare.py
imports: import os
  import random
  import json
  import logging
  from datasets.prepare_EMOVDB import prepare_emovdb
  from datasets.prepare_ESD import prepare_esd
  from datasets.prepare_IEMOCAP import prepare_iemocap
  from datasets.prepare_JLCORPUS import prepare_jlcorpus
  from datasets.prepare_RAVDESS import prepare_ravdess
label_desc: Use image node_id 7 for calling a global function with example usage: check_and_prepare_dataset(data_folder, data_name, prepare_function, dictonary, seed) without return types