code: def test_docker_login(mock_client) -> None:
      def _mock_subprocess_run(
          cmd: List[str],
          stdin=None,
          stdout=None,
          stderr=None,
          check=True,
      ) -> None:
          assert stdin.read() == b"password"
  
      mock_client.return_value.get_authorization_token.return_value = {
          "authorizationData": [
              {"authorizationToken": base64.b64encode(b"AWS:password")},
          ],
      }
  
      with mock.patch(
          "subprocess.run", side_effect=_mock_subprocess_run
      ):
          docker_login("docker_ecr")
  
file_path: ray/ci/ray_ci/test_utils.py
imports: import base64
  import sys
  import pytest
  from unittest import mock
  from typing import List
  from ci.ray_ci.utils import chunk_into_n, docker_login
label_desc: Use image node_id 2 for calling a global function with example usage: test_docker_login(mock_client) without return types