def delete(self, token):
self._lock.acquire_write()<EOL>try:<EOL><INDENT>lock = self._dict.get(token)<EOL>_logger.debug("<STR_LIT>".format(lock_string(lock)))<EOL>if lock is None:<EOL><INDENT>return False<EOL><DEDENT>key = "<STR_LIT>".format(lock.get("<STR_LIT:root>"))<EOL>if key in self._dict:<EOL><INDENT>tokList = self._dict[key]<EOL>if len(tokList) > <NUM_LIT:1>:<EOL><INDENT>tokList.remove(token)<EOL>self._dict[key] = tokList<EOL><DEDENT>else:<EOL><INDENT>del self._dict[key]<EOL><DEDENT><DEDENT>del self._dict[token]<EOL>self._flush()<EOL><DEDENT>finally:<EOL><INDENT>self._lock.release()<EOL><DEDENT>return True<EOL>
Delete lock.

        Returns True on success. False, if token does not exist, or is expired.