@Override
    public CompilationCustomizer create() {
        final Map<String, Object> timedInterruptAnnotationParams = new HashMap<>();
        timedInterruptAnnotationParams.put("value", interruptionTimeout);
        timedInterruptAnnotationParams.put("unit", GeneralUtils.propX(GeneralUtils.classX(TimeUnit.class), TimeUnit.MILLISECONDS.toString()));
        timedInterruptAnnotationParams.put("checkOnMethodStart", false);
        timedInterruptAnnotationParams.put("thrown", GeneralUtils.classX(TimedInterruptTimeoutException.class));
        return new ASTTransformationCustomizer(timedInterruptAnnotationParams, TimedInterrupt.class);
    }
Injects a check in loops and other areas of code to interrupt script execution if the run time exceeds the
specified time.

@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/TimedInterruptGroovyCustomizer.java