<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_child(self, child):
 """ Remove a child from this node. """

        assert child in self.children
        self.children.remove(child)
        self.index.pop(child.tax_id)
        if child.parent is self:
            child.parent = None
        if child.index is self.index:
            child.index = None

        # Remove child subtree from index
        for n in child:
            if n is child:
                continue
            self.index.pop(n.tax_id)
            if n.index is self.index:
                n.index = None