code: def key_exists(self, key):
          
          assert isinstance(key, str)
          self._close()
          try:
              return self._unsafe_key_exists(key)
          finally:
              self._open()
docs: 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.