class SchedulerLockInterceptor {
    private final LockingTaskExecutor lockingTaskExecutor;
    private final CdiLockConfigurationExtractor lockConfigurationExtractor;

    @Inject
    public SchedulerLockInterceptor(LockProvider lockProvider) {
        this.lockingTaskExecutor = new DefaultLockingTaskExecutor(lockProvider);
        String lockAtMostFor = getConfigValue("shedlock.defaults.lock-at-most-for");
        String lockAtLeastFor = getConfigValue("shedlock.defaults.lock-at-least-for");
        Objects.requireNonNull(lockAtMostFor, "shedlock.defaults.lock-at-most-for parameter is mandatory");
        this.lockConfigurationExtractor = new CdiLockConfigurationExtractor(
                parseDuration(lockAtMostFor), lockAtLeastFor != null ? parseDuration(lockAtLeastFor) : Duration.ZERO);
    }

    private static String getConfigValue(String propertyName) {
        return ConfigProvider.getConfig().getConfigValue(propertyName).getValue();
    }

    @AroundInvoke
    Object lock(InvocationContext context) throws Throwable {<FILL_FUNCTION_BODY>}
}

        Class<?> returnType = context.getMethod().getReturnType();
        if (!void.class.equals(returnType) && !Void.class.equals(returnType)) {
            throw new LockingNotSupportedException();
        }

        Optional<LockConfiguration> lockConfiguration =
                lockConfigurationExtractor.getLockConfiguration(context.getMethod());
        if (lockConfiguration.isPresent()) {
            lockingTaskExecutor.executeWithLock((LockingTaskExecutor.Task) context::proceed, lockConfiguration.get());
            return null;
        } else {
            return context.proceed();
        }
    
<no_super_class>