<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_signature(message, signature):
 """ 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. """

        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