import asyncio


def sync_version(async_coroutine):
  """ Decorates asyncio coroutine in order to make it synchronous.

  Args:
    async_coroutine: asyncio coroutine to wrap.
  Returns:
    Synchronous version of the method.
  """
  def sync(*args, **kwargs):
    event_loop = asyncio.get_event_loop()
    result = event_loop.run_until_complete(async_coroutine(*args, **kwargs))
    return result
  return sync