in reply to Add Code to functions in File
#---Insert code for function xxx here
And then search and replace using regexes to put the code in the right place.
Not tricky, but effective, if you can get those comments in there in the first place.
I didn't believe in evil until I dated it.