public static DimensionBinding createFrom(List<String> dimensions, Map<String, String> context) {
        if (dimensions == null || dimensions.size() == 0) {
            if (context == null) return nullBinding;
            if (dimensions == null) return new DimensionBinding(null, DimensionValues.empty, context); // Null, but must preserve context
        }

        return new DimensionBinding(dimensions, extractDimensionValues(dimensions, context), context);
    }
Creates a binding from a variant and a context. Any of the arguments may be null.
container-search/src/main/java/com/yahoo/search/query/profile/DimensionBinding.java