def stations_by_river(stations):
    """This function takes a list of station objects as the arugement 
    and then maps each river to the monitoring stations which is on the given river 
    and then returns a dictionary of these river with their monitoring stations as the values."""
    river_names = {}
    for station in stations:
        if station.river in river_names:
            river_names[station.river].append(station.name)
        else :
            river_names[station.river] = [station.name]
    return river_names