code: def get_results(output_dir):
      results = {}
      path = os.path.join(output_dir, "all_results.json")
      if os.path.exists(path):
          with open(path, "r") as f:
              results = json.load(f)
      else:
          raise ValueError(f"can't find {path}")
      return results
  
file_path: adapters/examples/pytorch/test_xla_examples.py
imports: import json
  import logging
  import os
  import sys
  from time import time
  from unittest.mock import patch
  from transformers.testing_utils import TestCasePlus, require_torch_tpu
label_desc: Use image node_id 1 for calling a global function with example usage: get_results(output_dir) and returns: results