def main():
    out_dct = {
        "_comment_s10_countries": (
            "The country code is part of the S10 standard for international"
            " mail.  The official reference for this is here:"
            " http://www.upu.int/uploads/tx_sbdownloader/"
            "S10TechnicalStandard.pdf"),
        "_comment_s10_countries": "Auto-generated file.  Do not modify."
    }
    reqs = grequests.imap(
        fetch_country_data(), size=15, exception_handler=exception_handler)
        #  (x for n, x in enumerate(fetch_country_data())
        #   if n < 200 and n > 190),
        #  size=3, exception_handler=exception_handler)
    out_dct['s10_countries'] = sorted(
        [gen_country_json_dct(req) for req in reqs], key=lambda x: x['country'])
    with open(OUT_FILE, 'w') as fout:
        json.dump(out_dct, fout, indent=2, ensure_ascii=False)