code: def close(self):
          
  
          if self.hwman.stream.connected:
              self.hwman.disconnect()
  
          self.hwman.close()
          self.opened = False
docs: Close and potentially disconnect from a device.