code: def cleanup(self):
          
          if not self.persist:
              self.hide()
              self.clear()
          self._serial_interface.cleanup()
docs: Attempt to switch the device off or put into low power mode (this
          helps prolong the life of the device), clear the screen and close
          resources associated with the underlying serial interface.
  
          If :py:attr:`persist` is ``True``, the device will not be switched off.
  
          This is a managed function, which is called when the python processs
          is being shutdown, so shouldn't usually need be called directly in
          application code.