> But yes, in the future, we could change that, but I don't have see a plan for that.

In this case it would make sense to move the if (%(output_name)s != NULL) { ... } block in a separate method that will be called from c_code().  I think this will improve the code regardless of future plans.