protected Map<String, List<Object>> fetchAttributeValueFromScript(
        final ExecutableCompiledScript script,
        final RegisteredServiceAttributeReleasePolicyContext context,
        final Map<String, List<Object>> attributes) throws Throwable {
        val args = new Object[]{attributes, LOGGER, context.getPrincipal(), context.getRegisteredService()};
        val result = (Map<String, List<Object>>) script.execute(args, Map.class, false);
        if (result != null) {
            LOGGER.debug("Attribute release policy returned attributes [{}] from script [{}]", result, groovyScript);
        } else {
            LOGGER.warn("Attribute release policy script [{}] returned null", groovyScript);
        }
        return result;
    }
This is {@link GroovyScriptAttributeReleasePolicy} that attempts to release attributes
based on the execution result of an external groovy script.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-authentication-attributes/src/main/java/org/apereo/cas/services/GroovyScriptAttributeReleasePolicy.java