code: 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.sourcef 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)
docs: Return a version of this instance with inputs replaced by outputs and vice versa.