There is no way to add a task to the task graph twice. It may not be immediately intuitive, but what you likely want is to have two different tasks of the same type, each named/configured differently (rather than a single task run twice).
In my case decided to run the script twice, from the root build script. But actually there is a possibility to run method twice with this construction, but bad thing is that it is not launching all depending task task insertion() << {