def normalize_role_assignments(assignments):
    new_assignments = []
    for assignment in assignments:
        new_val = munch.Munch({'id': assignment['role']['id']})
        for scope in ('project', 'domain'):
            if scope in assignment['scope']:
                new_val[scope] = assignment['scope'][scope]['id']
        for assignee in ('user', 'group'):
            if assignee in assignment:
                new_val[assignee] = assignment[assignee]['id']
        new_assignments.append(new_val)
    return new_assignments
Creates a new pager.
dataset/ETHPy150Open openstack-infra/shade/shade/_utils.py/normalize_role_assignments--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/ui/wx/python_editor.py/PythonEditor.__init__