def gen_occ():
    for i in range(len(mapping)):
        val = occupation.get(i, None)
        if (val is None):
            (yield val)
        else:
            (yield tuple(((k, val[k]) for k in val)))
def gen_occ():
    for i in range(len(mapping)):
        val = occupation.get(i, None)
        if (val is None):
            (yield val)
        else:
            (yield tuple(((k, val[k]) for k in val)))