def METHOD_NAME(jwt: str) -> "LicenseKey":
    """Validate the license from a given JWT"""
    try:
        headers = get_unverified_header(jwt)
    except PyJWTError:
        raise ValidationError("Unable to verify license")
    x5c: list[str] = headers.get("x5c", [])
    if len(x5c) < 1:
        raise ValidationError("Unable to verify license")
    try:
        our_cert = load_der_x509_certificate(b64decode(x5c[0]))
        intermediate = load_der_x509_certificate(b64decode(x5c[1]))
        our_cert.verify_directly_issued_by(intermediate)
        intermediate.verify_directly_issued_by(get_licensing_key())
    except (InvalidSignature, TypeError, ValueError, Error):
        raise ValidationError("Unable to verify license")
    try:
        body = from_dict(
            LicenseKey,
            decode(
                jwt,
                our_cert.public_key(),
                algorithms=["ES512"],
                audience=get_license_aud(),
            ),
        )
    except PyJWTError:
        raise ValidationError("Unable to verify license")
    return body