code: def unregister(self):
          
          if self.registered:
              #Only if we have not received any message recently.
              if datetime.datetime.now()-datetime.timedelta(seconds=self.unregister_timeout) > self.lastmsg:
                  self.registered = False
                  if self.parent:
                      self.parent.unregister(self)
docs: Proxy method to unregister the device with the parent.