def METHOD_NAME(
    context: CfnginContext, *__args: Any, **kwargs: Any
) -> Dict[str, str]:
    """Ensure server cert exists.
    Args:
        context: CFNgin context object.
    Returns:
        Dict containing ``status``, ``cert_name``, and ``cert_arn``.
    """
    args = EnsureServerCertExistsHookArgs.parse_obj(kwargs)
    client = context.get_session().client("iam")
    status = "unknown"
    try:
        response = client.get_server_certificate(ServerCertificateName=args.cert_name)
        cert_arn = _get_cert_arn_from_response(response)
        status = "exists"
        LOGGER.info("certificate exists: %s (%s)", args.cert_name, cert_arn)
    except ClientError:
        if args.prompt:
            upload = input(
                f"Certificate '{args.cert_name}' wasn't found. Upload it now? (yes/no) "
            )
            if upload != "yes":
                return {}
        parameters = _get_cert_contents(args.dict())
        if not parameters:
            return {}
        response = client.upload_server_certificate(**parameters)
        cert_arn = _get_cert_arn_from_response(response)
        status = "uploaded"
        LOGGER.info("uploaded certificate: %s (%s)", args.cert_name, cert_arn)
    return {
        "status": status,
        "cert_name": args.cert_name,
        "cert_arn": cert_arn,
    }