def get_rerole_stats(rerole_ops):
    """
    Gets a summary of information about the rerole operation.
    """
    stats = {'base': {}, 'team':{}}
    users = {'base': {}, 'team':{}}
    for (user, role_spec) in rerole_ops:
        to = role_spec[:2]
        per_team = role_spec[2]
        if len(per_team):
            # Not yet supported; sorry!
            return None
        for (i, roletype) in enumerate(('base', 'team')):
            if to[i] is not None:
                if user['email'] in users[roletype]:
                    print("WARNING: %s role for %s already defined as %s"%(
                        roletype, user['email'], users[roletype][user['email']]
                    ))
                    continue
                stats[roletype][to[i]] = stats[roletype].get(to[i], 0)+1
                users[roletype][user['email']] = to[i]
    return stats