Refactoring the python client code to reformat it for the generated packages