src/main/java/org/opensearch/knn/index/MethodComponent.java [137:154]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        for (Map.Entry<String, Object> providedParameter : providedParameters.entrySet()) {
            // MethodComponentContextParameters are parameters that are MethodComponentContexts.
            // MethodComponent may or may not require training. So, we have to check if the parameter requires training.
            // If the parameter does not exist, the parameter estimate will be skipped. It is not this function's job
            // to validate the parameters.
            Parameter<?> parameter = parameters.get(providedParameter.getKey());
            if (!(parameter instanceof Parameter.MethodComponentContextParameter)) {
                continue;
            }

            Parameter.MethodComponentContextParameter methodParameter = (Parameter.MethodComponentContextParameter) parameter;
            Object providedValue = providedParameter.getValue();
            if (!(providedValue instanceof MethodComponentContext)) {
                continue;
            }

            MethodComponentContext parameterMethodComponentContext = (MethodComponentContext) providedValue;
            MethodComponent methodComponent = methodParameter.getMethodComponent(parameterMethodComponentContext.getName());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/opensearch/knn/index/MethodComponent.java [198:214]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        for (Map.Entry<String, Object> providedParameter : providedParameters.entrySet()) {
            // MethodComponentContextParameters are parameters that are MethodComponentContexts. We need to check if
            // these parameters add overhead. If the parameter does not exist, the parameter estimate will be skipped.
            // It is not this function's job to validate the parameters.
            Parameter<?> parameter = parameters.get(providedParameter.getKey());
            if (!(parameter instanceof Parameter.MethodComponentContextParameter)) {
                continue;
            }

            Parameter.MethodComponentContextParameter methodParameter = (Parameter.MethodComponentContextParameter) parameter;
            Object providedValue = providedParameter.getValue();
            if (!(providedValue instanceof MethodComponentContext)) {
                continue;
            }

            MethodComponentContext parameterMethodComponentContext = (MethodComponentContext) providedValue;
            MethodComponent methodComponent = methodParameter.getMethodComponent(parameterMethodComponentContext.getName());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



