I don't see what it will improve. You can make a function in c_code_support() and call it in c_code(). This function would represent 24 lines of the 27 lines of the code returned by c_code. This would just split the code in different python function. Sadly, this is harder to understand then different c function as they are farther apart.