def makeUserLaneMap(flowcell):
    """
    Given a flowcell return a mapping of users interested in
    the libraries on those lanes.
    """
    users = {}

    for lane in flowcell.lane_set.all():
        for affiliation in lane.library.affiliations.all():
            for user in affiliation.users.all():
                users.setdefault(user,[]).append(lane)

    return users