async def run_or_return(task: Union[Coroutine, Any]):
if iscoroutine(task):<EOL><INDENT>return await task<EOL><DEDENT>else:<EOL><INDENT>return task<EOL><DEDENT>
If the specified task is a coroutine then await it, otherwise return
directly.