code: def check_stack_repr(gdb, expr, expected):
      """
      Check printing a stack-located value.
      """
      s = gdb.print_value(expr)
      if isinstance(expected, re.Pattern):
          assert expected.match(s), s
      else:
          assert s == expected
  
imports: from functools import lru_cache
  import os
  import re
  import shutil
  import subprocess
  import sys
  import pytest
  import pyarrow
label_desc: Use image node_id 10 for calling a global function with example usage: check_stack_repr(gdb, expr, expected) without return types