code: def set_state(self, newState, timer=0):
          
          if _debug: ServerSSM._debug("set_state %r (%s) timer=%r", newState, SSM.transactionLabels[newState], timer)
  
          # do the regular state change
          SSM.set_state(self, newState, timer)
  
          # when completed or aborted, remove tracking
          if (newState == COMPLETED) or (newState == ABORTED):
              if _debug: ServerSSM._debug("    - remove from active transactions")
              self.ssmSAP.serverTransactions.remove(self)
  
              # release the device info
              if self.device_info:
                  if _debug: ClientSSM._debug("    - release device information")
                  self.ssmSAP.deviceInfoCache.release(self.device_info)
docs: This function is called when the client wants to change state.