def get_model_metadata(dashboard):
    """Retrieves the model metadata  from the dashboard

    Parameters
    ----------
    dashboard : plsexplain.dashboard.Dashboard
        The dashboard instance to read from

    Returns
    -------
    Callable
        The API handler for rendering the model metadata
    """

    def get_model_metadata_internal():
        return {"type": dashboard.performance.model_type, "class": str(dashboard.explainer.model_class)}

    return get_model_metadata_internal