docs: def write(self, data, waitForResponse=True, timeout=5, parseError=True, writeTerm='\r', expectedResponseTermSeq=None):
          """ Write data to the modem.
  
          This method adds the ``\\r\\n`` end-of-line sequence to the data parameter, and
          writes it to the modem.
  
          :param data: Command/data to be written to the modem
          :type data: str
          :param waitForResponse: Whether this method should block and return the response from the modem or not
          :type waitForResponse: bool
          :param timeout: Maximum amount of time in seconds to wait for a response from the modem
          :type timeout: int
          :param parseError: If True, a CommandError is raised if the modem responds with an error (otherwise the response is returned as-is)
          :type parseError: bool
          :param writeTerm: The terminating sequence to append to the written data
          :type writeTerm: str
          :param expectedResponseTermSeq: The expected terminating sequence that marks the end of the modem's response (defaults to ``\\r\\n``)
          :type expectedResponseTermSeq: str
  
          :raise CommandError: if the command returns an error (only if parseError parameter is True)
          :raise TimeoutException: if no response to the command was received from the modem
  
          :return: A list containing the response lines from the modem, or None if waitForResponse is False
          :rtype: list
          """
          self.log.debug('write: %s', data)
          responseLines = super(GsmModem, self).write(data + writeTerm, waitForResponse=waitForResponse, timeout=timeout, expectedResponseTermSeq=expectedResponseTermSeq)
          if self._writeWait > 0: # Sleep a bit if required (some older modems suffer under load)            
              time.sleep(self._writeWait)
          if waitForResponse:
              cmdStatusLine = responseLines[-1]
              if parseError:
                  if 'ERROR' in cmdStatusLine:
                      cmErrorMatch = self.CM_ERROR_REGEX.match(cmdStatusLine)
                      if cmErrorMatch:
                          errorType = cmErrorMatch.group(1)
                          errorCode = int(cmErrorMatch.group(2))
                          if errorCode == 515 or errorCode == 14:
                              # 515 means: "Please wait, init or command processing in progress."
                              # 14 means "SIM busy"
                              self._writeWait += 0.2 # Increase waiting period temporarily
                              # Retry the command after waiting a bit
                              self.log.debug('Device/SIM busy error detected; self._writeWait adjusted to %fs', self._writeWait)
                              time.sleep(self._writeWait)
                              result = self.write(data, waitForResponse, timeout, parseError, writeTerm, expectedResponseTermSeq)
                              self.log.debug('self_writeWait set to 0.1 because of recovering from device busy (515) error')
                              if errorCode == 515:
                                  self._writeWait = 0.1 # Set this to something sane for further commands (slow modem)
                              else:
                                  self._writeWait = 0 # The modem was just waiting for the SIM card
                              return result
                          if errorType == 'CME':
                              raise CmeError(data, int(errorCode))
                          else: # CMS error
                              raise CmsError(data, int(errorCode))
                      else:
                          raise CommandError(data)
                  elif cmdStatusLine == 'COMMAND NOT SUPPORT': # Some Huawei modems respond with this for unknown commands
                      raise CommandError(data + '({0})'.format(cmdStatusLine))
              return responseLines