def acquire(self, timeout=None):
        end_time = time.time()
        if timeout is not None and timeout > 0:
            end_time += timeout

        if timeout is None:
            wait = 0.1
        elif timeout <= 0:
            wait = 0
        else:
            wait = timeout / 10

        cursor = self.connection.cursor()

        while True:
            self.attempt_acquire(self, timeout, cursor, end_time, wait)
dataset/ETHPy150Open haystack/eyebrowse-server/notifications/lockfile.py/SQLiteFileLock.acquire/original