code: def indent(self, indent):
          
          curr_docparts = self._docparts
          self._docparts = []
          self.indentation += indent
          try:
              yield
          finally:
              self.indentation -= indent
              indented_docparts = self._docparts
              self._docparts = curr_docparts
              self._docparts.append(nest(indent, concat(indented_docparts)))
docs: with statement support for indenting/dedenting.