code: def is_program_installed(basename):
      """
      Return program absolute path if installed in PATH.
      Otherwise, return None
      On macOS systems, a .app is considered installed if
      it exists.
      """
      if (
          sys.platform == "darwin"
          and basename.endswith(".app")
          and osp.exists(basename)
      ):
          return basename
  
      for path in os.environ["PATH"].split(os.pathsep):
          abspath = osp.join(path, basename)
          if osp.isfile(abspath):
              return abspath
  
imports: import glob
  import hashlib
  import os
  import os.path
  import platform
  import shutil
  import subprocess
  import sys
  import zipfile
  from base64 import urlsafe_b64encode
label_desc: Use image node_id 3 for calling a global function with example usage: is_program_installed(basename) and returns: basename, abspath