def METHOD_NAME(*args, **kwargs):
    console_manager = args[0]
    if not console_manager._lock.acquire(False):
        raise ConsoleBusyError("Console is in use.")
    try:
        return function(*args, **kwargs)
    finally:
        console_manager._lock.release()