def METHOD_NAME(
        lock: Lock,
        c_func: Callable[..., int],
        callback: Callable[[], None],
        *args: Any) -> int:
    with lock:
        retval = c_func(*args)
    callback()
    return retval