@Override
    public Void visitDateLiteral(final GremlinParser.DateLiteralContext ctx) {
        // child at 2 is the date argument to datetime() and comes enclosed in quotes
        final String dtString = ctx.getChild(2).getText();
        // for consistency, use the way OffsetDateTime formats the date strings
        final String dt = DatetimeHelper.parse(removeFirstAndLastCharacters(dtString)).toString();
        // specially handling as python isoformat does not support zulu until 3.11
        final String dtISOString = dt.endsWith("Z") ? dt.replace("Z", "+00:00") : dt;
        sb.append("datetime.datetime.fromisoformat('").append(dtISOString).append("')");
        return null;
    }
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