I have n number of asyncio tasks running as below.
import asyncio
def main(tasks):
for task in tasks:
await asyncio.create_task(do_something(task),name=task['name'])
asyncio.run(main(tasks))
After sometime I need to cancel only the particular task using task name.