code: def test_run_pre_exec_script_cmd_error(isfile):
      with patch("subprocess.Popen") as popen:
          popen.return_value.wait.return_value = 1
          with pytest.raises(RuntimeEnvironmentError):
              RuntimeEnvironmentManager().run_pre_exec_script(
                  pre_exec_script_path="path/to/pre_exec.sh"
              )
          call_args = popen.call_args[0][0]
          expected_cmd = ["/bin/bash", "-eu", "path/to/pre_exec.sh"]
          assert call_args == expected_cmd
  
imports: from __future__ import absolute_import
  import subprocess
  import pytest
  from mock import patch, Mock
  import sys
  import shlex
  import os
  from mock.mock import MagicMock
  from sagemaker.remote_function.runtime_environment.runtime_environment_manager import RuntimeEnvironmentManager, RuntimeEnvironmentError
label_desc: Use image node_id 21 for calling a global function with example usage: test_run_pre_exec_script_cmd_error(isfile) without return types