A Python tool chest for metaprogramming