'Remove the Section with the given name'

def del_section(self, name):

    if (name not in self.sections):
        raise ValueError('Section    name    not    found')
    if (len(self.children) == 1):
        raise ValueError("Can't    delete    last    section")
    sec = self.sections[name]
    idx = min(self.children.index(sec), 1)
    next_sec = self.children[(idx - 1)]
    del self.children[idx]
    next_sec.children.extend(sec.children)
    for i in sec.children:
        i.parent = next_sec
