Validates the given key.
        :param key: the key to validate
        :raises InvalidKeyError: raised if the given key is invalid

def validate_key(key: str):
        """
        Validates the given key.
        :param key: the key to validate
        :raises InvalidKeyError: raised if the given key is invalid
        """
        if "//" in key:
            raise DoubleSlashKeyError(key)
        elif normpath(key) != key:
            raise NonNormalisedKeyError(key)