def closest_station(lat, lon, cache_dir):
    'Return the ZONE_ID.WMO_ID of the closest station to our lat/lon.'
    if ((lat is None) or (lon is None) or (not os.path.isdir(cache_dir))):
        return
    stations = bom_stations(cache_dir)

    def comparable_dist(wmo_id):
        'Create a psudeo-distance from latitude/longitude.'
        (station_lat, station_lon) = stations[wmo_id]
        return (((lat - station_lat) ** 2) + ((lon - station_lon) ** 2))
    return min(stations, key=comparable_dist)
Return the ZONE_ID.WMO_ID of the closest station to our lat/lon.
def closest_station(lat, lon, cache_dir):
    
    if ((lat is None) or (lon is None) or (not os.path.isdir(cache_dir))):
        return
    stations = bom_stations(cache_dir)

    def comparable_dist(wmo_id):
        'Create a psudeo-distance from latitude/longitude.'
        (station_lat, station_lon) = stations[wmo_id]
        return (((lat - station_lat) ** 2) + ((lon - station_lon) ** 2))
    return min(stations, key=comparable_dist)