code: def scan_path(executable="mongod"):
      
      for path in os.environ.get("PATH", "").split(":"):
          path = os.path.abspath(path)
          executable_path = os.path.join(path, executable)
          if os.path.exists(executable_path):
              return executable_path
docs: Scan the path for a binary.