def expand_kids_by_index(self, *indices):
        "Expand (inline) children at the given indices"
        for i in sorted(indices, reverse=True): # reverse so that changing tail won't affect indices
            kid = self.children[i]
            self.children[i:i+1] = kid.children
def expand_kids_by_index ( self , * indices ) : for i in sorted ( indices , reverse = True ) : kid = self . children [ i ] self . children [ i : i + 1 ] = kid . children
Expand (inline) children at the given indices