def _is_algorithm_brute(model):
    """Checks if the algorithm for the scikit model is set to 'brute'."""
    return model.algorithm == "brute" or (
        model.algorithm == "auto" and model._fit_method == "brute"
    )
Checks if the algorithm for the scikit model is set to 'brute'.
coremltools/converters/sklearn/_k_neighbors_classifier.py