code: def detach(self):
          
          if self.parent is not None:
              if self in self.parent.children:
                  self.parent.children.remove(self)
              self.parent = None
          return self
docs: Detach from parent.
          @return: This element removed from its parent's
              child list and I{parent}=I{None}
          @rtype: L{Element}