human
I wrote the below code

    if (not isinstance(source, (Future, concurrent.futures.Future))):
        raise TypeError('A    future    is    required    for    source    argument')
    if (not isinstance(destination, (Future, concurrent.futures.Future))):
        raise TypeError('A    future    is    required    for    destination    argument')
    source_loop = (source._loop if isinstance(source, Future) else None)
    dest_loop = (destination._loop if isinstance(destination, Future) else None)
    def _set_state(future, other):
        if isinstance(future, Future):
            _copy_future_state(other, future)
        else:
            _set_concurrent_future_state(future, other)
    def _call_check_cancel(destination):
        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_set_state(source):
        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)
    destination.add_done_callback(_call_check_cancel)
    source.add_done_callback(_call_set_state)

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def _chain_future(source, destination):