code: def test_launch_script(mock_validate_config: mock.MagicMock) -> None:
      # Use runpy to actually run the whole launch script.
      with test_util.set_resources_id_env_var():
          with test_util.set_mock_cluster_info(
              ["0.0.0.1"], 0, 1
          ) as info:
              # Successful entrypoints exit 0.
              info.trial._config["entrypoint"] = ["true"]
              with pytest.raises(SystemExit) as e:
                  runpy.run_module(
                      "determined.exec.launch",
                      run_name="__main__",
                      alter_sys=True,
                  )
              assert e.value.code == 0, e
  
              # Failing entrypoints exit 1.
              info.trial._config["entrypoint"] = ["false"]
              with pytest.raises(SystemExit) as e:
                  runpy.run_module(
                      "determined.exec.launch",
                      run_name="__main__",
                      alter_sys=True,
                  )
              assert e.value.code == 1, e
  
file_path: determined/harness/tests/launch/test_launch.py
imports: import runpy
  from typing import Any, Dict, List
  from unittest import mock
  import pytest
  import determined
  from determined.exec import launch
  from tests.launch import test_util
label_desc: Use image node_id 5 for calling a global function with example usage: test_launch_script(mock_validate_config) without return types