def run_utility(config, utility):
    loop = asyncio.get_event_loop()

    async def runner():
        (await initialize(config, loop=loop))
        log.initilize(config['log'])
        (await utility(loop=loop))
        (await deinitialize(config, loop=loop))
    loop.run_until_complete(runner())
def run_utility(config, utility):
    loop = asyncio.get_event_loop()

    async def runner():
        (await initialize(config, loop=loop))
        log.initilize(config['log'])
        (await utility(loop=loop))
        (await deinitialize(config, loop=loop))
    loop.run_until_complete(runner())