class_docstr: Runtime Environment Manager class to manage runtime environment.
class_docstr_tok: ["Runtime","Environment","Manager","class","to","manage","runtime","environment","."]
docstr: Runs script of pre-execution commands if existing.
  
  Args:
      pre_exec_script_path (str): Path to pre-execution command script file.
code: def run_pre_exec_script(self, pre_exec_script_path: str):
      """Runs script of pre-execution commands if existing.
  
      Args:
          pre_exec_script_path (str): Path to pre-execution command script file.
      """
      if os.path.isfile(pre_exec_script_path):
          logger.info(
              "Running pre-execution commands in '%s'",
              pre_exec_script_path,
          )
          return_code, error_logs = _run_pre_execution_command_script(
              pre_exec_script_path
          )
  
          if return_code:
              error_message = f"Encountered error while running pre-execution commands. Reason: {error_logs}"
              raise RuntimeEnvironmentError(error_message)
      else:
          logger.info(
              "'%s' does not exist. Assuming no pre-execution commands to run",
              pre_exec_script_path,
          )
  
imports: from __future__ import absolute_import
  import logging
  import sys
  import shlex
  import os
  import subprocess
  import time
  import dataclasses
  import json
label_desc: Use image node_id 6 for calling the RuntimeEnvironmentManager obj's underlying member method code with example usage: obj.run_pre_exec_script(pre_exec_script_path) without return types