def _train_and_score(clf, X, y, train, test):
    """ Fit a classifier clf and train set
    and return the accuracy score on test set"""

    clf.fit(X[train], y[train])
    return clf.score(X[test], y[test])