def METHOD_NAME(
    self, python_version: Optional[str] = None, custom_tag: Optional[str] = None
) -> str:
    """Generates the AWS ECR image name, like:
    "1234567890.dkr.ecr.us-west-1.amazonaws.com/foo:some-tag".
    """
    check.invariant(not (python_version and custom_tag))
    check.opt_str_param(python_version, "python_version")
    check.opt_str_param(custom_tag, "custom_tag")
    tag: Optional[str]
    if python_version:
        last_updated = self._get_last_updated_for_python_version(python_version)
        tag = python_version_image_tag(python_version, last_updated)
    else:
        tag = custom_tag
    return ecr_image(
        self.image,
        tag,
        aws_account_id=get_aws_account_id(),
        aws_region=get_aws_region(),
    )