def METHOD_NAME(self, y) -> dict[str, str] | None:
    """
    Parameters:
        y: plot data
    Returns:
        plot type mapped to plot base64 data
    """
    import matplotlib.figure
    if y is None:
        return None
    if isinstance(y, (ModuleType, matplotlib.figure.Figure)):  # type: ignore
        dtype = "matplotlib"
        out_y = processing_utils.encode_plot_to_base64(y)
    elif "bokeh" in y.__module__:
        dtype = "bokeh"
        from bokeh.embed import json_item  # type: ignore
        out_y = json.dumps(json_item(y))
    else:
        is_altair = "altair" in y.__module__
        dtype = "altair" if is_altair else "plotly"
        out_y = y.to_json()
    return {"type": dtype, "plot": out_y}