def stations_by_river(stations):
    """Returns a dict that maps river names (as keys) to a list of station objects on the river"""

    river_dict = dict()
    for station in stations:
        if station.river in river_dict:
            river_dict[station.river].append(station.name)
        else:
            river_dict[station.river] = [station.name]

    return river_dict