'Load serialized key as JWK.
:param str data: Public or private key serialized as PEM or DER.
:param str password: Optional password.
:param backend: A `.PEMSerializationBackend` and
`.DERSerializationBackend` provider.
:raises errors.Error: if unable to deserialize, or unsupported
JWK algorithm
:returns: JWK of an appropriate type.
:rtype: `JWK`'

@classmethod
def load(cls, data, password=None, backend=None):

    try:
        key = cls._load_cryptography_key(data, password, backend)
    except errors.Error as error:
        logger.debug('Loading    symmetric    key,    asymmetric    failed:    %s', error)
        return JWKOct(key=data)
    if ((cls.typ is not NotImplemented) and (not isinstance(key, cls.cryptography_key_types))):
        raise errors.Error('Unable    to    deserialize    {0}    into    {1}'.format(key.__class__, cls.__class__))
    for jwk_cls in six.itervalues(cls.TYPES):
        if isinstance(key, jwk_cls.cryptography_key_types):
            return jwk_cls(key=key)
    raise errors.Error('Unsupported    algorithm:    {0}'.format(key.__class__))
