<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exit_code(self, code):
 """Set the App exit code. For TC Exchange Apps there are 3 supported exit codes. * 0 indicates a normal exit * 1 indicates a failure during execution * 3 indicates a partial failure Args: code (integer):
 The exit code value for the app. """

        if code is not None and code in [0, 1, 3]:
            self._exit_code = code
        else:
            self.log.warning(u'Invalid exit code')