def key_exists(self, key):
        """Check if key has previously been added to this store.

        This function makes a linear search through the log file and is very
        slow.

        Returns True if the event has previously been added, False otherwise.

        """
        assert isinstance(key, str)
        self._close()
        try:
            return self._unsafe_key_exists(key)
        finally:
            self._open()
Check if key has previously been added to this store.

        This function makes a linear search through the log file and is very
        slow.

        Returns True if the event has previously been added, False otherwise.