code: def glob_check(root_folder, has_eval=False, input_json=None):
      all_files = []
      for ext in [".json", ".uem", ".wav", ".flac"]:
          all_files.extend(
              glob.glob(
                  os.path.join(root_folder, "**/*{}".format(ext)),
                  recursive=True,
              )
          )
  
      for f in tqdm.tqdm(all_files):
          digest = md5_file(f)
          if not has_eval and Path(f).parent == "eval":
              continue
  
          if (
              not input_json[str(Path(f).relative_to(root_folder))]
              == digest
          ):
              raise RuntimeError(
                  "MD5 Checksum for {} is not the same. "
                  "Data has not been generated correctly. "
                  "You can retry to generate it or re-download it. "
                  "If this does not work, please reach us. ".format(
                      str(Path(f).relative_to(root_folder))
                  )
              )
  
file_path: espnet/egs2/chime7_task1/diar_asr1/local/check_data_gen.py
imports: import argparse
  import glob
  import hashlib
  import json
  import os
  from pathlib import Path
  import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: glob_check(root_folder, has_eval, input_json) without return types