def _call_check_cancel(destination: Union[(concurrent.futures.Future, Future)]) -> None:
    if destination.cancelled():
        if ((source_loop is None) or (source_loop is dest_loop)):
            source.cancel()
        else:
            source_loop.call_soon_threadsafe(source.cancel)
def _call_check_cancel(destination: Union[(concurrent.futures.Future, Future)]) -> None:
    if destination.cancelled():
        if ((source_loop is None) or (source_loop is dest_loop)):
            source.cancel()
        else:
            source_loop.call_soon_threadsafe(source.cancel)