def _fix_tornado_crash():
    'Set default asyncio policy to be compatible with Tornado 6.\n\n    Tornado 6 (at least) is not compatible with the default\n    asyncio implementation on Windows. So here we\n    pick the older SelectorEventLoopPolicy when the OS is Windows\n    if the known-incompatible default policy is in use.\n\n    This has to happen as early as possible to make it a low priority and\n    overrideable\n\n    See: https://github.com/tornadoweb/tornado/issues/2608\n\n    FIXME: if/when tornado supports the defaults in asyncio,\n    remove and bump tornado requirement for py38\n    '
    if (env_util.IS_WINDOWS and (sys.version_info >= (3, 8))):
        import asyncio
        try:
            from asyncio import WindowsProactorEventLoopPolicy, WindowsSelectorEventLoopPolicy
        except ImportError:
            pass
        else:
            if (type(asyncio.get_event_loop_policy()) is WindowsProactorEventLoopPolicy):
                asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
Set default asyncio policy to be compatible with Tornado 6.

Tornado 6 (at least) is not compatible with the default
asyncio implementation on Windows. So here we
pick the older SelectorEventLoopPolicy when the OS is Windows
if the known-incompatible default policy is in use.

This has to happen as early as possible to make it a low priority and
overrideable

See: https://github.com/tornadoweb/tornado/issues/2608

FIXME: if/when tornado supports the defaults in asyncio,
remove and bump tornado requirement for py38
def _fix_tornado_crash():
    'Set default asyncio policy to be compatible with Tornado 6.\n\n    Tornado 6 (at least) is not compatible with the default\n    asyncio implementation on Windows. So here we\n    pick the older SelectorEventLoopPolicy when the OS is Windows\n    if the known-incompatible default policy is in use.\n\n    This has to happen as early as possible to make it a low priority and\n    overrideable\n\n    See: https://github.com/tornadoweb/tornado/issues/2608\n\n    FIXME: if/when tornado supports the defaults in asyncio,\n    remove and bump tornado requirement for py38\n    '
    if (env_util.IS_WINDOWS and (sys.version_info >= (3, 8))):
        import asyncio
        try:
            from asyncio import WindowsProactorEventLoopPolicy, WindowsSelectorEventLoopPolicy
        except ImportError:
            pass
        else:
            if (type(asyncio.get_event_loop_policy()) is WindowsProactorEventLoopPolicy):
                asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())