def _get_image_repo(image: str) -> str:
  """Extracts image name before ':' which is REPO part of the image name."""
  image_fields = image.split(':')
  if len(image_fields) > 2:
    raise ValueError(f'Too many ":" in the image name: {image}')
  return image_fields[0]