def METHOD_NAME(signing_key_pem, certificate_pem):
    # type: (str, str) -> Tuple[EllipticCurvePrivateKey, RSAPrivateKey, Certificate]
    """Validates the attestation signing key and certificates specified.
    :param str signing_key_pem: PEM encoded EC or RSA signing key.
    :param str certificate_pem: PEM encoded X.509 certificate.
    :return: Returns the decoded signing key and certificate
    :rtype: RSAPrivateKey or ElilipticCurvePrivateKey, Certificate
    The validate_signing_keys method decodes the signing key and certificate
    and verifies that the public key associated with the certificate and the
    signing key are the same key.
    """
    # Start by making sure that both signing key and certificate are present.
    if signing_key_pem and not certificate_pem:
        raise ValueError("signing_key cannot be specified without signing_certificate.")
    if certificate_pem and not signing_key_pem:
        raise ValueError("signing_certificate cannot be specified without signing_key.")
    # Verify that the key and certificate are validly PEM encoded.
    signing_key = serialization.load_pem_private_key(
        signing_key_pem.encode("utf-8"), password=None, backend=default_backend()
    )
    certificate = load_pem_x509_certificate(
        certificate_pem.encode("utf-8"), backend=default_backend()
    )
    # We only support ECDS and RSA keys in the MAA service.
    if not isinstance(signing_key, RSAPrivateKey) and not isinstance(
        signing_key, EllipticCurvePrivateKey
    ):
        raise ValueError("Signing keys must be either ECDS or RSA keys.")
    # Ensure that the public key in the certificate matches the public key of the key.
    cert_public_key = certificate.public_key().public_bytes(
        Encoding.PEM, PublicFormat.SubjectPublicKeyInfo
    )
    key_public_key = signing_key.public_key().public_bytes(
        Encoding.PEM, PublicFormat.SubjectPublicKeyInfo
    )
    if cert_public_key != key_public_key:
        raise ValueError("Signing key must match certificate public key")
    return signing_key, certificate