code: def test_ray_installation() -> None:
      install_ray_cmds = []
  
      def _mock_subprocess(
          inputs: List[str], env, stdout, stderr
      ) -> None:
          install_ray_cmds.append(inputs)
  
      with mock.patch(
          "subprocess.check_call", side_effect=_mock_subprocess
      ):
          LinuxTesterContainer("team", build_type="debug")
          docker_image = f"{_DOCKER_ECR_REPO}:{_RAYCI_BUILD_ID}-team"
          assert install_ray_cmds[-1] == [
              "docker",
              "build",
              "--pull",
              "--progress=plain",
              "--build-arg",
              f"BASE_IMAGE={docker_image}",
              "--build-arg",
              "BUILD_TYPE=debug",
              "-t",
              docker_image,
              "-f",
              "/ray/ci/ray_ci/tests.env.Dockerfile",
              "/ray",
          ]
  
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 5 for calling a global function with example usage: test_ray_installation() without return types