<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init():
 """ Initialize synchronously. """

    loop = asyncio.get_event_loop()
    if loop.is_running():
        raise Exception("You must initialize the Ray async API by calling "
                        "async_api.init() or async_api.as_future(obj) before "
                        "the event loop starts.")
    else:
        asyncio.get_event_loop().run_until_complete(_async_init())