<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sort_sections(self, order):
 """ Sort sections according to the section names in the order list. All remaining sections are added to the end in their original order :param order: Iterable of section names :return: """


        order_lc = [e.lower() for e in order]

        sections = OrderedDict( (k,self.sections[k]) for k in order_lc if k in self.sections)

        sections.update( (k,self.sections[k]) for k in self.sections.keys() if k not in order_lc)

        assert len(self.sections) == len(sections)

        self.sections = sections