<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inverted(self):
 """ Returns an inverted copy of this query. :return <orb.Query> """

        out = self.copy()
        out.setInverted(not self.isInverted())
        return out