interpreter pattern class itemtype(object)def __init__(selfname)self name name class customer(object)def __init__(selfcustomer_typename)self customer_type customer_type self name name class customertype(object)def __init__(selfcustomer_type)self customer_type customer_type member customertype("member"pizza itemtype("pizza"burger itemtype("burger"drink itemtype("drink"monday dayoftheweek("monday"def setup_demo_tab()member_customer customer(member"john"tab tab(member_customertab items append(item("margarita"pizza )tab items append(item("cheddar melt"burger )tab items append(item("hawaian"pizza )tab items append(item("latte"drink )tab items append(item("club"pizza )return tab if __name__ ="__main__"tab setup_demo_tab(rules [members always get off their total tab rules append