def write(self, msg, depth=0): if depth: prefix = self.INDENT * depth msg = indent(msg, prefix) return super(CodeWriter, self).write(msg)