class LockingInterceptor implements MethodInterceptor {
        private final LockManager lockManager;

        private LockingInterceptor(LockManager lockManager) {
            this.lockManager = lockManager;
        }

        @Override
        public Object invoke(MethodInvocation invocation) throws Throwable {<FILL_FUNCTION_BODY>}
    }

            Object[] arguments = invocation.getArguments();
            if (arguments.length >= 1 && arguments[0] instanceof Runnable) {
                arguments[0] = new LockableRunnable((Runnable) arguments[0], lockManager);
            } else {
                logger.warn("Task scheduler first argument should be Runnable");
            }
            return invocation.proceed();
        
<no_super_class>