@Override
    public List<Traversal.Admin<?, ?>> getLocalChildren() {
        if (null == this.selectTraversal && null == this.keyTraversal)
            return Collections.emptyList();

        final List<Traversal.Admin<?, ?>> children = new ArrayList<>();
        if (selectTraversal != null)
            children.add(selectTraversal);
        if (keyTraversal != null)
            children.add(keyTraversal);

        return children;
    }
@author Daniel Kuppitz (http://gremlin.guru)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/TraversalSelectStep.java