code: def connect(self):
          '''
          Connect to the serial port
          '''
          if self._port:
              self._driver = MagDeckDriver()
              self._driver.connect(self._port)
              self._device_info = self._driver.get_device_info()
          else:
              # Sanity check: Should never happen, because connect should
              # never be called without a port on Module
              raise MissingDevicePortError(
                  "MagDeck couldnt connect to port {}".format(self._port)
              f connect(self):
          '''
          Connect to the serial port
          '''
          if self._port:
              self._driver = MagDeckDriver()
              self._driver.connect(self._port)
              self._device_info = self._driver.get_device_info()
          else:
              # Sanity check: Should never happen, because connect should
              # never be called without a port on Module
              raise MissingDevicePortError(
                  "MagDeck couldnt connect to port {}".format(self._port)
              )
docs: Connect to the serial port