public String getGremlin(final String g) {
        // special handling for CardinalityValueTraversal
        if (gremlin.length() != 0 && gremlin.charAt(0) != '.') {
            return gremlin.toString();
        }
        return g + gremlin;
    }
Get gremlin-lang compatible representation of Traversal.
"g" is expected for gremlin-lang.
"__" can be used for an anonymous {@link GraphTraversal}.

@param g GraphTraversalSource name
@return gremlin-lang compatible String
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/GremlinLang.java