code: def pickle_data_and_config(
      config: Dict[str, Any], root: str, suffix: str
  ) -> Tuple[Dict[str, Any], Dict[str, Any]]:
      # setup test directory and save results to pickle file
      os.mkdir(root)
      try:
          save_results(
              **config, results=[], config={}, root=root, suffix=suffix
          )
  
          # return pickle data and the config
          with open(
              get_path(**config, root=root, suffix=suffix), "rb"
          ) as f:
              yield pickle.load(f), config
      finally:
          # remove directory
          shutil.rmtree(root)
  
file_path: opacus/benchmarks/tests/test_utils.py
imports: import os
  import pickle
  import shutil
  from typing import Any, Dict, List, Tuple
  import pytest
  import torch
  from helpers import get_n_byte_tensor, skipifnocuda
  from benchmarks.utils import get_layer_set, get_path, reset_peak_memory_stats, save_results
label_desc: Use image node_id 4 for calling a global function with example usage: pickle_data_and_config(config, root, suffix) without return types