def _capture_feature_importance(
    feature_importance_df, n_important_features, result_dict
):
    """
    Identifies top `n_important_features` from `feature_importance_df` and then
    add those to `result_dict`
    """
    top_imp_features_df = (
        feature_importance_df[["feature", "importance"]]
        .groupby("feature")
        .mean()
        # .sort_values(by="importance", ascending=False)[:n_important_features]
        .sort_values(by="importance", ascending=False)
        .reset_index()
    )
    result_dict["feature_importance"] = feature_importance_df
    result_dict["best_features"] = top_imp_features_df
    return result_dict