def METHOD_NAME(op_upd, t, k, lst):
    if lst:
        if type(lst[next(iter(lst))]) == dict:
            for i in lst:
                METHOD_NAME(op_upd, t, k+(i,), lst[i])
            return
    if op_upd:
        do_update(t, k, lst)
    else:
        do_delete(t, k, lst)