Prepare code for string writing.

def _print_code(self, code):
        """Prepare code for string writing."""
        # This needs a rewrite --- it doesn't check for match clashes! So sub11 would be replaced by sub1 before being replaced with sub11!!
        for key in self.variables.keys():
            for arg in self.variables[key]:
                code = code.replace(arg.name, 'self.'+arg.name)
        return code