code: def gather_refactoring_results(
      glob_filter="*",
      new_interfaces_git="https://github.com/speechbrain/speechbrain",
      new_interfaces_branch="hf-interface-testing",
      new_interfaces_local_dir="tests/tmp/hf_interfaces",
      yaml_path="tests/tmp/refactoring_results.yaml",
  ):
      """After refactoring HF YAMLs and/or code, gather prediction results.
  
      Parameters
      ----------
      glob_filter: str
          Filter for a repo subset or a specific repo.
      new_interfaces_git: str
          Your git repo (or default: `https://github.com/speechbrain/speechbrain`);
          can be specified in tests/utils/overrides.yaml
      new_interfaces_branch: str
          Default is `hf-interface-testing` (a git branch); can be specified in tests/utils/overrides.yaml
      new_interfaces_local_dir: str
          Default is `tests/tmp/hf_interfaces` (a local path); can be specified in tests/utils/overrides.yaml
      yaml_path: str
          Path where to store/load refactoring testing results for later comparison.
      """
      # expected results need to exist
      if os.path.exists(yaml_path):
          with open(yaml_path) as yaml_in:
              results = yaml.safe_load(yaml_in)
  
      # go through each repo
      updates_dir = init(
          new_interfaces_git,
          new_interfaces_branch,
          new_interfaces_local_dir,
      )
      repos = map(
          os.path.basename,
          glob(f"{updates_dir}/{glob_filter}"),
      )
      for repo in repos:
          # skip if results are there
          if "after" not in results[repo].keys():
              # get values
              with open(f"{updates_dir}/{repo}/test.yaml") as yaml_test:
                  values = load_hyperpyyaml(yaml_test)
  
              print(
                  f"Collecting refactoring results for: {repo} w/ values={values}"
              )
  
              # extend the results
              results[repo]["after"] = get_prediction(
                  repo, values, updates_dir
              )
              results[repo]["same"] = (
                  results[repo]["before"] == results[repo]["after"]
              )
  
              # update
              with open(yaml_path, "w") as yaml_out:
                  yaml.dump(results, yaml_out, default_flow_style=None)
  
              print(f"\tsame: {results[repo]['same'] }")
  
imports: import os
  import sys
  from tqdm import tqdm
  import yaml
  import torch
  import importlib
  import subprocess
  import speechbrain
  from glob import glob
  from copy import deepcopy
  from torch.utils.data import DataLoader
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.distributed import run_on_main
  from speechbrain.utils.train_logger import FileTrainLogger
  from speechbrain.inference.interfaces import foreign_class
  from speechbrain.dataio.dataloader import LoopedLoader, make_dataloader
label_desc: Use image node_id 5 for calling a global function with example usage: gather_refactoring_results(glob_filter, new_interfaces_git, new_interfaces_branch, new_interfaces_local_dir, yaml_path) without return types