    def _call_coroutine(self, sync, async_f, *args, **kwargs):
        """Call an async coroutine function, either blocking or returning an awaitable

        if not sync: calls function directly, returning awaitable
        else: Block on a call in our background thread, return actual result
        """
        if not sync:
            return async_f(*args, **kwargs)
        else:
            return self._synchronize(async_f, *args, **kwargs)
Call an async coroutine function, either blocking or returning an awaitable

if not sync: calls function directly, returning awaitable
else: Block on a call in our background thread, return actual result
jupyterhub/services/auth.py