code: def _cmd_exists(cmd: str) -> bool:
      if "PATH" not in os.environ:
          return False
      return any(
          os.access(os.path.join(path, cmd), os.X_OK)
          for path in os.environ["PATH"].split(os.pathsep)
      )
  
imports: from __future__ import annotations
  import os
  import re
  import shutil
  import struct
  import subprocess
  import sys
  import warnings
  from setuptools import Extension, setup
  from setuptools.command.build_ext import build_ext
label_desc: Use image node_id 8 for calling a global function with example usage: _cmd_exists(cmd) and returns: any, False