code: def endSections(self, level=u'0'):
          
  
          iSectionsClosed = self.storeSectionState(level)
          self.document.append("</section>\n" * iSectionsClosed)
docs: Closes all sections of level >= sectnum. Defaults to closing all open sections