parameters: (self, token)
return_statement: return element
docstring: Create an element and insert it into the tree
docstring_summary: Create an element and insert it into the tree
docstring_tokens: Create an element and insert it into the tree
function: def insertElementTable(self, token):
          """Create an element and insert it into the tree"""
          element = self.createElement(token)
          if self.openElements[-1].name not in tableInsertModeElements:
              return self.insertElementNormal(token)
          else:
              # We should be in the InTable mode. This means we want to do
              # special magic element rearranging
              parent, insertBefore = self.getTableMisnestedNodePosition()
              if insertBefore is None:
                  parent.appendChild(element)
              else:
                  parent.insertBefore(element, insertBefore)
              self.openElements.append(element)
          return element
function_tokens: def insertElementTable ( self , token ) : element = self . createElement ( token ) if self . openElements [ - 1 ] . name not in tableInsertModeElements : return self . insertElementNormal ( token ) else : # We should be in the InTable mode. This means we want to do # special magic element rearranging parent , insertBefore = self . getTableMisnestedNodePosition ( ) if insertBefore is None : parent . appendChild ( element ) else : parent . insertBefore ( element , insertBefore ) self . openElements . append ( element ) return element