def test_key(self, key):
        """Raise an error if the key is not compatible with this primer.

        Primers provide needed data to start encryption and decryption. For
        it be compatible with a key, it must contain one byte less than the
        key's dimensions and must be a subset of the base in the key."""
        if len(self.__data) != key.dimensions - 1:
            raise ValueError('Key size must be one more than the primer size!')
        if not set(self.__data).issubset(key.base):
            raise ValueError('Key data must be a superset of primer data!')
Raise an error if the key is not compatible with this primer.

        Primers provide needed data to start encryption and decryption. For
        it be compatible with a key, it must contain one byte less than the
        key's dimensions and must be a subset of the base in the key.
recipes/Python/578075_Markov_Encryption_Module/recipe-578075.py