Revert "Remove get_task_name function"

This reverts commit 591a9cc00e48362d24b533b841e9e779e4a38b0d.