def _model_pred(
    sources,
    fit_model,
    df_pred,
    extensive="pop_count",
    intensive=None,
    formula="pop_count ~ -1 + build_counts",
):

    """
    Predict target values for areal interpolation
    using source fitted values

    Parameters
    ----------
    sources : gpd.GeoDataFrame
        sources to interpolate values from
    fit_model : statsmodel object
        dataframe containing predictors only
    df_pred : pd.DataFrame (default: None)
        dataframe containing variable of interest and predictors
    extensive : str or list
        extensive variables e.g. population counts
    intensive : str or list
        intensive variables e.g. population density
    formula : str
        Patsy or R style regression formula
    Returns
    -------
    targets : gpd.GeoDataFrame
        targets containing interpolated values
    """

    # Make predictions for targets using fitted model
    pred = fit_model.predict(df_pred)

    if extensive is not None and intensive is None:
        wts = sum(sources[extensive]) / sum(pred)
        pred *= wts
        return pred
    else:
        return pred