<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):
        '''
        Return a version of this instance with inputs replaced by outputs and vice versa.
        '''
        return Instance(input=self.output, output=self.input,
                        annotated_input=self.annotated_output,
                        annotated_output=self.annotated_input,
                        alt_inputs=self.alt_outputs,
                        alt_outputs=self.alt_inputs,
                        source=self.source)