public static String convertCamelCaseToSnakeCase(final String camelCase) {
            if (camelCase == null || camelCase.isEmpty())
                return camelCase;

            // skip if this is a class/enum indicated by the first letter being upper case
            if (Character.isUpperCase(camelCase.charAt(0)))
                return camelCase;

            final StringBuilder sb = new StringBuilder();
            for (int i = 0; i < camelCase.length(); i++) {
                final char c = camelCase.charAt(i);
                if (Character.isUpperCase(c)) {
                    sb.append("_");
                    sb.append(Character.toLowerCase(c));
                } else {
                    sb.append(c);
                }
            }
            return sb.toString();
        }
Converts a Gremlin traversal string into a Python source code representation of that traversal with an aim at
sacrificing some formatting for the ability to compile correctly.
<ul>
    <li>Range syntax has no direct support</li>
    <li>Normalizes whitespace</li>
    <li>If floats are not suffixed they will translate as BigDecimal</li>
    <li>Makes anonymous traversals explicit with double underscore</li>
    <li>Makes enums explicit with their proper name</li>
</ul>
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/PythonTranslateVisitor.java