code: def main(
      artifact_type: str,
      image_type: str,
      build_type: str,
      python_version: str,
      platform: List[str],
      architecture: str,
      canonical_tag: str,
      upload: bool,
  ) -> None:
      """
      Build a wheel or jar artifact
      """
      docker_login(_DOCKER_ECR_REPO.split("/")[0])
      if artifact_type == "wheel":
          logger.info(f"Building wheel for {python_version}")
          build_wheel(python_version, build_type, architecture)
          return
  
      if artifact_type == "docker":
          logger.info(
              f"Building {image_type} docker for {python_version} on {platform}"
          )
          build_docker(
              image_type,
              python_version,
              build_type,
              platform,
              architecture,
              canonical_tag,
              upload,
          )
          return
  
      if artifact_type == "anyscale":
          logger.info(
              f"Building {image_type} anyscale for {python_version} on {platform}"
          )
          build_anyscale(
              image_type,
              python_version,
              build_type,
              platform,
              architecture,
              canonical_tag,
              upload,
          )
          return
  
      raise ValueError(f"Invalid artifact type {artifact_type}")
  
file_path: ray/ci/ray_ci/builder.py
imports: from typing import List
  import click
  from ci.ray_ci.builder_container import DEFAULT_PYTHON_VERSION, PYTHON_VERSIONS, BUILD_TYPES, ARCHITECTURE, BuilderContainer
  from ci.ray_ci.forge_container import ForgeContainer
  from ci.ray_ci.docker_container import PLATFORM
  from ci.ray_ci.ray_docker_container import RayDockerContainer
  from ci.ray_ci.anyscale_docker_container import AnyscaleDockerContainer
  from ci.ray_ci.container import _DOCKER_ECR_REPO
  from ci.ray_ci.utils import logger, docker_login
label_desc: Use image node_id 1 for calling a global function with example usage: main(artifact_type, image_type, build_type, python_version, platform, architecture, canonical_tag, upload) without return types