code: def get_ray_spilled_and_restored_mb():
      import ray._private.internal_api as internal_api
      import re
  
      summary_str = internal_api.memory_summary(stats_only=True)
  
      match = re.search("Spilled (\d+) MiB", summary_str)
      spilled_mb = int(match.group(1)) if match else 0
  
      match = re.search("Restored (\d+) MiB", summary_str)
      restored_mb = int(match.group(1)) if match else 0
  
      return spilled_mb, restored_mb
  
file_path: ray/release/air_tests/air_benchmarks/mlperf-train/metric_utils.py
imports: import threading
  import time
label_desc: Use image node_id 1 for calling a global function with example usage: get_ray_spilled_and_restored_mb() and returns: spilled_mb,  restored_mb