human
Here's a good function header given the following:
I wrote the below code

    ident = loop.__dict__.get('_thread_ident')
    if ((ident is not None) and (ident == threading.get_ident())):
        raise RuntimeError('Cannot    be    called    from    within    the    event    loop')
    future = concurrent.futures.Future()
    def run_callback():
        'Run    callback    and    store    result.'
        try:
            future.set_result(callback(*args))
        except Exception as exc:
            if future.set_running_or_notify_cancel():
                future.set_exception(exc)
            else:
                _LOGGER.warning('Exception    on    lost    future:    ', exc_info=True)
    loop.call_soon_threadsafe(run_callback)
    return future

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

def run_callback_threadsafe(loop, callback, *args):