def METHOD_NAME(self, item: Union["MenuItemDict", "SubmenuItemDict"]) -> Dict[str, GLib.Variant]:
    if "text" in item and "icon_name" in item:
        label = Pango.parse_markup(item["text"], -1, "\0")[2] if item.get("markup", False) else item["text"]
        props = {
            "label": GLib.Variant("s", label),
            "icon-name": GLib.Variant("s", item["icon_name"]),
            "enabled": GLib.Variant("b", item["sensitive"]),
        }
        if "submenu" in item:
            props["children-display"] = GLib.Variant("s", "submenu")
        return props
    else:
        return {"type": GLib.Variant("s", "separator")}