code: def _read_execute_info(path, parents):
      """Read the ExecuteInfo.txt file and return the base directory."""
      path = os.path.join(path, "StarCraft II/ExecuteInfo.txt")
      if os.path.exists(path):
          with open(
              path, "rb"
          ) as f:  # Binary because the game appends a '\0' :(.
              for line in f:
                  parts = [
                      p.strip() for p in line.decode("utf-8").split("=")
                  ]
                  if len(parts) == 2 and parts[0] == "executable":
                      exec_path = parts[1].replace(
                          "\\", "/"
                      )  # For windows compatibility.
                      for _ in range(parents):
                          exec_path = os.path.dirname(exec_path)
                      return exec_path
  
imports: import copy
  import os
  import platform
  import subprocess
  import sys
  from absl import flags
  from absl import logging
  from pysc2.lib import sc_process
  from pysc2.run_configs import lib
label_desc: Use image node_id 1 for calling a global function with example usage: _read_execute_info(path, parents) and returns: exec_path