def load_key(self, key):
        """
        Load a RSA key. Try to serialize the key before binding it to this
        instance.

        :param key: An RSA key instance
        """

        self._serialize(key)
        if isinstance(key, rsa.RSAPrivateKey):
            self.priv_key = key
            self.pub_key = key.public_key()
        else:
            self.pub_key = key

        return self
Load a RSA key. Try to serialize the key before binding it to this
        instance.

        :param key: An RSA key instance