private Step<?, ?> transformToNotStep(final Traversal.Admin<?, ?> traversal, final TraversalParent parent) {
        final Step<?, ?> filterStep = parent.asStep();
        final Traversal.Admin<?,?> parentTraversal = filterStep.getTraversal();
        final Step<?,?> notStep = new NotStep<>(parentTraversal,
                traversal.getSteps().isEmpty() ? __.identity() : traversal.clone());
        filterStep.getLabels().forEach(notStep::addLabel);
        return notStep;
    }
The {@code traversal} argument was marked as one that could be converted to {@code not()}, so wrap it inside
that step and copy the labels.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/CountStrategy.java