def METHOD_NAME(lock):
    """Try to acquire the lock. Return True on success, False on deadlock."""
    try:
        lock.acquire()
    except self.DeadlockError:
        return False
    else:
        return True