def repack(dict_obj, key_map, rm_keys=[]):
    """ Repackage a dict object by renaming and removing keys"""
    for k, v in key_map.items():
        dict_obj[v] = dict_obj.pop(k)
    for k in rm_keys:
        del dict_obj[k]

    return dict_obj