def METHOD_NAME(self, X=None, n_neighbors=None, return_distance=True):
    check_is_fitted(self)
    if sklearn_check_version("1.0") and X is not None:
        self._check_feature_names(X, reset=False)
    return dispatch(
        self,
        "kneighbors",
        {
            "onedal": self.__class__._onedal_kneighbors,
            "sklearn": sklearn_NearestNeighbors.METHOD_NAME,
        },
        X,
        n_neighbors,
        return_distance,
    )