@staticmethod
def from_signature(message, signature):
    ' Attempts to create PublicKey object by deriving it\n        from the message and signature.\n\n        Args:\n            message (bytes): The message to be verified.\n            signature (Signature): The signature for message.\n               The recovery_id must not be None!\n\n        Returns:\n            PublicKey:\n                A PublicKey object derived from the\n                signature, it it exists. None otherwise.\n        '
    if (signature.recovery_id is None):
        raise ValueError('The signature must have a recovery_id.')
    msg = get_bytes(message)
    pub_keys = bitcoin_curve.recover_public_key(msg, signature, signature.recovery_id)
    for (k, recid) in pub_keys:
        if ((signature.recovery_id is not None) and (recid == signature.recovery_id)):
            return PublicKey(k.x, k.y)
    return None
Attempts to create PublicKey object by deriving it
from the message and signature.

Args:
    message (bytes): The message to be verified.
    signature (Signature): The signature for message.
       The recovery_id must not be None!

Returns:
    PublicKey:
        A PublicKey object derived from the
        signature, it it exists. None otherwise.
@staticmethod
def from_signature(message, signature):
    ' Attempts to create PublicKey object by deriving it\n        from the message and signature.\n\n        Args:\n            message (bytes): The message to be verified.\n            signature (Signature): The signature for message.\n               The recovery_id must not be None!\n\n        Returns:\n            PublicKey:\n                A PublicKey object derived from the\n                signature, it it exists. None otherwise.\n        '
    if (signature.recovery_id is None):
        raise ValueError('The signature must have a recovery_id.')
    msg = get_bytes(message)
    pub_keys = bitcoin_curve.recover_public_key(msg, signature, signature.recovery_id)
    for (k, recid) in pub_keys:
        if ((signature.recovery_id is not None) and (recid == signature.recovery_id)):
            return PublicKey(k.x, k.y)
    return None