async def _call_job_func(self, func: Callable, args: tuple, kwargs: Dict[(str, Any)]):
    if ((not self.run_sync_functions_in_event_loop) and (not iscoroutinefunction(func))):
        wrapped = partial(func, *args, **kwargs)
        return (await run_sync_in_worker_thread(wrapped))
    return_value = func(*args, **kwargs)
    if isinstance(return_value, Coroutine):
        return_value = (await return_value)
    return return_value
async def _call_job_func(self, func: Callable, args: tuple, kwargs: Dict[(str, Any)]):
    if ((not self.run_sync_functions_in_event_loop) and (not iscoroutinefunction(func))):
        wrapped = partial(func, *args, **kwargs)
        return (await run_sync_in_worker_thread(wrapped))
    return_value = func(*args, **kwargs)
    if isinstance(return_value, Coroutine):
        return_value = (await return_value)
    return return_value