def METHOD_NAME(self):
    async def main():
        coro = main()
        try:
            asyncio.run(coro)
        finally:
            coro.close()  # Suppress ResourceWarning
    with self.assertRaisesRegex(RuntimeError,
                                'cannot be called from a running'):
        asyncio.run(main())