code: def which(name):
      for p in os.environ["PATH"].split(os.pathsep):
          f = os.path.join(p, name)
          if os.path.isfile(f):
              return f
          if os.name == "nt":
              p = p.replace('"', "")
              f = os.path.join(p, name)
              if os.path.isfile(f):
                  return f
              f = f + ".exe"
              if os.path.isfile(f):
                  return f
      return None
  
imports: import os
  import subprocess
label_desc: Use image node_id 2 for calling a global function with example usage: which(name) and returns: None, f, f, f