class A()
def __init__(self):
...
async def do_something(self):
all_obj = muppy.get_objects()
coroutine_objects = muppy.filter(all_obj, Type=types.CoroutineType)
print(len(coroutine_obkects))
for i in range(1,11):
task = asyncio.create_task(A().do_something())
task_list.append(task)
await asyncio.gather(*task_list)