public static Optional<Object> getIdValue(final Object... keyValues) {
        for (int i = 0; i < keyValues.length; i = i + 2) {
            if (keyValues[i].equals(T.id))
                return Optional.ofNullable(keyValues[i + 1]);
        }
        return Optional.empty();
    }
Extracts the value of the {@link T#id} key from the list of arguments.

@param keyValues a list of key/value pairs
@return the value associated with {@link T#id}
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelper.java