generating function overloads into Python code