code: def test_launch_worker(
      mock_api: mock.MagicMock,
      mock_cluster_info: mock.MagicMock,
      mock_subprocess: mock.MagicMock,
  ) -> None:
      cluster_info = test_util.make_mock_cluster_info(
          ["0.0.0.0", "0.0.0.1"], 1, 4
      )
      mock_cluster_info.return_value = cluster_info
      with test_util.set_resources_id_env_var():
          launch.deepspeed.main(["script"])
  
      mock_cluster_info.assert_called_once()
      assert (
          os.environ["DET_CHIEF_IP"] == cluster_info.container_addrs[0]
      )
  
      mock_api.assert_called_once()
  
      pid_server_cmd = launch.deepspeed.create_pid_server_cmd(
          cluster_info.allocation_id, len(cluster_info.slot_ids)
      )
      sshd_cmd = launch.deepspeed.create_sshd_cmd()
  
      expected_cmd = pid_server_cmd + sshd_cmd
      mock_subprocess.assert_called_once_with(expected_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 6 for calling a global function with example usage: test_launch_worker(mock_api, mock_cluster_info, mock_subprocess) without return types