parameters: (self, tag)
return_statement: return self._last
docstring: Close and return current Element.
  
          *tag* is the element name.
docstring_summary: Close and return current Element.
docstring_tokens: Close and return current Element .
function: def end(self, tag):
          """Close and return current Element.
  
          *tag* is the element name.
  
          """
          self._flush()
          self._last = self._elem.pop()
          assert self._last.tag == tag,\
                 "end tag mismatch (expected %s, got %s)" % (
                     self._last.tag, tag)
          self._tail = 1
          return self._last
function_tokens: def end ( self , tag ) : self . _flush ( ) self . _last = self . _elem . pop ( ) assert self . _last . tag == tag , "end tag mismatch (expected %s, got %s)" % ( self . _last . tag , tag ) self . _tail = 1 return self . _last