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