def try_acquire(self, elt):
        """
        elt must be hashable.

        If not yet locked, elt is captured for the current thread and
        True is returned.

        If already locked by the current thread its recursive counter
        is incremented and True is returned.

        If already locked by another thread False is returned.
        """
        me = threading.currentThread()
        self.lock.acquire()
        try:
            if elt not in self.locked:
                self.locked[elt] = [me, 1]
                return True
            elif self.locked[elt][0] == me:
                self.locked[elt][1] += 1
                return True
        finally:
            self.lock.release()
        return False
elt must be hashable.

        If not yet locked, elt is captured for the current thread and
        True is returned.

        If already locked by the current thread its recursive counter
        is incremented and True is returned.

        If already locked by another thread False is returned.