code: def docker_login(docker_ecr: str) -> None:
      """
      Login to docker with AWS credentials
      """
      token = boto3.client(
          "ecr", region_name="us-west-2"
      ).get_authorization_token()
      user, password = (
          base64.b64decode(
              token["authorizationData"][0]["authorizationToken"]
          )
          .decode("utf-8")
          .split(":")
      )
      with tempfile.TemporaryFile() as f:
          f.write(bytes(password, "utf-8"))
          f.flush()
          f.seek(0)
  
          subprocess.run(
              [
                  "docker",
                  "login",
                  "--username",
                  user,
                  "--password-stdin",
                  docker_ecr,
              ],
              stdin=f,
              stdout=sys.stdout,
              stderr=sys.stderr,
              check=True,
          )
  
file_path: ray/ci/ray_ci/utils.py
imports: import base64
  import logging
  import subprocess
  import sys
  import tempfile
  import boto3
  from typing import List
  from math import ceil
  import ci.ray_ci.bazel_sharding
label_desc: Use image node_id 3 for calling a global function with example usage: docker_login(docker_ecr) without return types