def METHOD_NAME(parent, icon, txt, builder_variant):
    obj = lv.menu_cont(parent)
    img = None
    label = None
    if icon  :
        img = lv.img(obj)
        img.set_src(icon)
    if txt :
        label = lv.label(obj)
        label.set_text(txt)
        label.set_long_mode(lv.label.LONG.SCROLL_CIRCULAR)
        label.set_flex_grow(1)
    if builder_variant == LV_MENU_ITEM_BUILDER_VARIANT_2 and icon and txt :
        img.add_flag(lv.obj.FLAG.FLEX_IN_NEW_TRACK)
        img.swap(label)
    return obj