code: def check_usable_gdb():
      # Verify that "gdb" was built with the embedded Python support enabled and
      # verify that "gdb" can load our custom hooks, as OS security settings may
      # disallow this without a customized .gdbinit.
      stdout, stderr = run_gdb(
          "--eval-command=python import sys; print(sys.version_info)",
          "--args",
          sys.executable,
          check=False,
      )
  
      if "auto-loading has been declined" in stderr:
          raise unittest.SkipTest(
              f"gdb security settings prevent use of custom hooks; "
              f"stderr: {stderr!r}"
          )
  
      if not stdout:
          raise unittest.SkipTest(
              f"gdb not built with embedded python support; "
              f"stderr: {stderr!r}"
          )
  
      if "major=2" in stdout:
          raise unittest.SkipTest("gdb built with Python 2")
  
file_path: cpython/Lib/test/test_gdb/util.py
imports: import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import sysconfig
  import unittest
  from test import support
label_desc: Use image node_id 4 for calling a global function with example usage: check_usable_gdb() without return types