code: def test_run_tests() -> None:
      def _mock_run_tests_in_docker(
          test_targets: List[str],
          gpu_ids: List[int],
          bazel_log_dir: str,
          test_envs: List[str],
          test_arg: Optional[str] = None,
      ) -> MockPopen:
          return MockPopen(test_targets)
  
      def _mock_shard_tests(
          tests: List[str], workers: int, worker_id: int
      ) -> List[str]:
          return chunk_into_n(tests, workers)[worker_id]
  
      with tempfile.TemporaryDirectory() as tmpdir, mock.patch(
          "ci.ray_ci.linux_tester_container.LinuxTesterContainer.get_artifact_mount",
          return_value=("/tmp/artifacts", tmpdir),
      ), mock.patch(
          "ci.ray_ci.linux_tester_container.LinuxTesterContainer._persist_test_results",
          return_value=None,
      ), mock.patch(
          "ci.ray_ci.linux_tester_container.LinuxTesterContainer._run_tests_in_docker",
          side_effect=_mock_run_tests_in_docker,
      ), mock.patch(
          "ci.ray_ci.tester_container.shard_tests",
          side_effect=_mock_shard_tests,
      ), mock.patch(
          "ci.ray_ci.linux_tester_container.LinuxTesterContainer.install_ray",
          return_value=None,
      ):
          container = LinuxTesterContainer(
              "team", shard_count=2, shard_ids=[0, 1]
          )
          # test_targets are not empty
          assert container.run_tests("manu", ["t1", "t2"], [])
          # test_targets is empty after chunking, but not creating popen
          assert container.run_tests("manu", ["t1"], [])
          assert container.run_tests("manu", [], [])
          # test targets contain bad_test
          assert not container.run_tests("manu", ["bad_test"], [])
  
imports: import json
  import os
  import platform
  import sys
  import pytest
  import tempfile
  from unittest import mock
  from typing import List, Optional
  from ci.ray_ci.linux_tester_container import LinuxTesterContainer
  from ci.ray_ci.utils import chunk_into_n
  from ci.ray_ci.container import _DOCKER_ECR_REPO, _RAYCI_BUILD_ID
label_desc: Use image node_id 6 for calling a global function with example usage: test_run_tests() and returns: MockPopen, chunk_into_n