public Optional<CompiledScript> compile(final String script) throws ScriptException {
        return compile(script, Optional.empty());
    }
Attempts to compile a script and cache it in the default {@link javax.script.ScriptEngine}.  This is only
possible if the {@link javax.script.ScriptEngine} implementation implements {@link javax.script.Compilable}.
In the event that the default {@link javax.script.ScriptEngine} does not implement it, the method will
return empty.
gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/engine/GremlinExecutor.java