def _suggest_target_postcodes(system, threshold=None):
    """Sort postcodes by population density (descending)
    - if considering threshold, filter out any with capacity above threshold
    """
    postcodes = system.postcode_sectors.values()
    total_postcodes = len(postcodes)
    if threshold is not None:
        considered_postcodes = [pcd for pcd in postcodes if pcd.capacity < threshold]
    else:
        considered_postcodes = [p for p in postcodes]
    # print("Considering {} of {} postcodes".format(len(considered_postcodes), total_postcodes))
    return sorted(considered_postcodes, key=lambda pcd: -pcd.population_density)