def invert(self, copy=False):
if copy:<EOL><INDENT>d = self.__dict__.copy()<EOL>del(d['<STR_LIT>'])<EOL>del(d['<STR_LIT>'])<EOL>self.base.invert()<EOL>self.top.invert()<EOL>return Interval(top=self.base, base=self.top, **d)<EOL><DEDENT>else:<EOL><INDENT>self.base.invert()<EOL>self.top.invert()<EOL>old_base = self.base<EOL>self.base = self.top<EOL>self.top = old_base<EOL>return<EOL><DEDENT>
Inverts the interval. If it was depth-ordered (positive numbers
increasing downwards.), it will now be elevation-ordered, and
vice versa.

Args:
    copy (bool): Whether to make a copy or not. Default: False.