def invert(self, copy=False):
if copy:<EOL><INDENT>return Striplog([i.invert(copy=True) for i in self])<EOL><DEDENT>else:<EOL><INDENT>for i in self:<EOL><INDENT>i.invert()<EOL><DEDENT>self.__sort()<EOL>o = self.order<EOL>self.order = {'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>'}[o]<EOL>return<EOL><DEDENT>
Inverts the striplog, changing its order and the order of its contents.

Operates in place by default.

Args:
    copy (bool): Whether to operate in place or make a copy.

Returns:
    None if operating in-place, or an inverted copy of the striplog
        if not.