def towns_with_station(stations):
    """Given list of stations (MonitoringStation object), return the
    names of the towns that have monitoring stations"""

    # Collect all the names of the towns in a set to avoid duplicate entries
    towns = {station.town for station in stations if station.town is not None}

    # Return a list for convenience
    return list(towns)