public static <T> T tryAndClone(final Object object) throws CloneNotSupportedException {
        return (object instanceof TraversableLambda) ? (T) ((TraversableLambda) object).clone() : (T) object;

    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/TraversableLambda.java