def _f(X, y, clf):
    """Returns the flattened coefficients of a fitted classifier.

    This function exists at the module level instead of as an anonymous or
    subordinate function so that it is importable by `multiprocessing`.

    Parameters
    ----------
    X : array
        Design matrix.
    y : array
        Response vector.
    clf : sklearn.base.BaseEstimator
        A scikit-learn estimator with `fit` and `predict` methods and a
        `coef_` attribute.

    Returns
    -------
    coef : array
        The flattened coefficients of the fitted classifier.
    """
    return clf.fit(X, y).coef_.flatten()