def get_feature_importance(dashboard):
    """Retrieves the feature importance data for the model.

    Parameters
    ----------
    dashboard : plsexplain.dashboard.Dashboard

    Returns
    -------
    Callable
        The API handler for the feature importance
    """

    def get_feature_importance_internal():
        return dashboard.feature_importance.to_dict()

    return get_feature_importance_internal