protected static Object[] tryUnrollSingleCollectionArgument(final Object[] ids) {
        final Object[] tempIds;
        if (ids != null && ids.length == 1) {
            final Optional<Collection> opt;
            if (ids[0] instanceof GValue && ((GValue<?>) ids[0]).getType().isCollection())
                opt = Optional.of((Collection) ((GValue) ids[0]).get());
            else if (ids[0] instanceof Collection)
                opt = Optional.of((Collection) ids[0]);
            else
                opt = Optional.empty();

            if (opt.isPresent()) {
                tempIds = opt.get().toArray(new Object[opt.get().size()]);
            } else
                tempIds = ids;
        } else {
            tempIds = ids;
        }
        return tempIds;
    }
Unrolls a single collection argument into an array of ids. This is useful for steps like
{@code g.V(['a','b','c'])}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/GraphStep.java