public static VertexProgramStrategy create(final Configuration configuration) {
        try {
            final VertexProgramStrategy.Builder builder = VertexProgramStrategy.build();
            for (final String key : (List<String>) IteratorUtils.asList(configuration.getKeys())) {
                if (key.equals(GRAPH_COMPUTER))
                    builder.graphComputer((Class) Class.forName(configuration.getString(key)));
                else if (key.equals(WORKERS))
                    builder.workers(configuration.getInt(key));
                else if (key.equals(PERSIST))
                    builder.persist(GraphComputer.Persist.valueOf(configuration.getString(key)));
                else if (key.equals(RESULT))
                    builder.result(GraphComputer.ResultGraph.valueOf(configuration.getString(key)));
                else if (key.equals(VERTICES))
                    builder.vertices((Traversal) configuration.getProperty(key));
                else if (key.equals(EDGES))
                    builder.edges((Traversal) configuration.getProperty(key));
                else
                    builder.configure(key, configuration.getProperty(key));
            }
            return builder.create();
        } catch (final ClassNotFoundException e) {
            throw new IllegalArgumentException(e.getMessage(), e);
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/traversal/strategy/decoration/VertexProgramStrategy.java