def await_result(func, *args, **kwargs):
    """If func returns an awaitable, raise that this runner can't handle it."""
    result = func(*args, **kwargs)
    if hasattr(result, '__await__'):
        raise TypeError(
            'Policy {} returned awaitable object in non-async pipeline.'.
            format(func))
    return result
