def run_on_executor(loop, fn, *args, **kwargs):
    if contextvars:
        context = contextvars.copy_context()
        fn = functools.partial(context.run, fn)
    return loop.run_in_executor(_EXECUTOR, functools.partial(fn, *args, **kwargs))
def run_on_executor(loop, fn, *args, **kwargs):
    if contextvars:
        context = contextvars.copy_context()
        fn = functools.partial(context.run, fn)
    return loop.run_in_executor(_EXECUTOR, functools.partial(fn, *args, **kwargs))