Downloads ports data from IANA & Wikipedia and converts
    it to a python module. This function is used to generate _ranges.py.

def _write_unassigned_ranges(out_filename):
    """
    Downloads ports data from IANA & Wikipedia and converts
    it to a python module. This function is used to generate _ranges.py.
    """
    with open(out_filename, 'wt') as f:
        f.write('# auto-generated by port_for._download_ranges (%s)\n' % datetime.date.today())
        f.write('UNASSIGNED_RANGES = [\n')
        for range in to_ranges(sorted(list(_unassigned_ports()))):
            f.write("    (%d, %d),\n" % range)
        f.write(']\n')