code: def check_reclaimed(output):
      # basic checks
      to_match = [
          r"Experiment started",
          "Experiment finished",
          r"x1, x2",
          r"Current state",
      ]
      for s in to_match:
          assert re.search(s, output), f"expecting string: {s}"
  
      # consumed/reclaimed checks
      (
          consumed_size,
          reclaimed_size,
          reclaimed_pct,
      ) = get_consumed_reclaimed_size(output)
  
      # compare: numbers are within 2% equal
      assert isclose(
          consumed_size, reclaimed_size, rel_tol=0.02
      ), f"Reclaimed all memory: {consumed_size} == {reclaimed_size}"
      reclaimed_expected_pct = 99
      assert (
          reclaimed_pct > reclaimed_expected_pct
      ), f"expecting {reclaimed_expected_pct} reclaimed, got {reclaimed_pct}"
  
imports: import numpy
  import torch
  import re, gc
  from math import isclose
  import inspect
label_desc: Use image node_id 13 for calling a global function with example usage: check_reclaimed(output) without return types