code: def test_launch_fail(
      mock_cluster_info: mock.MagicMock, mock_subprocess: mock.MagicMock
  ) -> None:
      cluster_info = test_util.make_mock_cluster_info(["0.0.0.0"], 0, 4)
      mock_cluster_info.return_value = cluster_info
      mock_subprocess.return_value.wait.return_value = 1
      script = ["s1", "s2"]
      pid_server_cmd = launch.deepspeed.create_pid_server_cmd(
          cluster_info.allocation_id, len(cluster_info.slot_ids)
      )
      deepspeed_cmd = launch.deepspeed.create_run_command(
          "localhost",
          launch.deepspeed.get_hostfile_path(
              multi_machine=False,
              allocation_id=cluster_info.allocation_id,
          ),
      )
      pid_client_cmd = launch.deepspeed.create_pid_client_cmd(
          cluster_info.allocation_id
      )
      log_redirect_cmd = launch.deepspeed.create_log_redirect_cmd()
      launch_cmd = (
          pid_server_cmd
          + deepspeed_cmd
          + pid_client_cmd
          + log_redirect_cmd
          + script
      )
  
      with test_util.set_resources_id_env_var():
          assert launch.deepspeed.main(script) == 1
  
      mock_cluster_info.assert_called_once()
      assert (
          os.environ["DET_CHIEF_IP"] == cluster_info.container_addrs[0]
      )
      assert os.environ["USE_DEEPSPEED"] == "1"
  
      mock_subprocess.assert_called_once_with(launch_cmd)
  
file_path: determined/harness/tests/launch/test_deepspeed.py
imports: import os
  import time
  from typing import Any, List
  from unittest import mock
  import pytest
  from deepspeed.launcher.runner import DEEPSPEED_ENVIRONMENT_NAME
  import determined.launch.deepspeed
  from determined import constants, launch
  from tests.launch import test_util
label_desc: Use image node_id 5 for calling a global function with example usage: test_launch_fail(mock_cluster_info, mock_subprocess) without return types