docs: def waitForNetworkCoverage(self, timeout=None):
          """ Block until the modem has GSM network coverage.
          
          This method blocks until the modem is registered with the network 
          and the signal strength is greater than 0, optionally timing out
          if a timeout was specified
          
          :param timeout: Maximum time to wait for network coverage, in seconds
          :type timeout: int or float
  
          :raise TimeoutException: if a timeout was specified and reached
          :raise InvalidStateException: if the modem is not going to receive network coverage (SIM blocked, etc)
  
          :return: the current signal strength
          :rtype: int
          """
          block = [True]
          if timeout != None:
              # Set up a timeout mechanism
              def _cancelBlock():                
                  block[0] = False                
              t = threading.Timer(timeout, _cancelBlock)
              t.start()
          ss = -1
          checkCreg = True
          while block[0]:
              if checkCreg:
                  cregResult = lineMatching(r'^\+CREG:\s*(\d),(\d)$', self.write('AT+CREG?', parseError=False)) # example result: +CREG: 0,1
                  if cregResult:
                      status = int(cregResult.group(2))
                      if status in (1, 5):
                          # 1: registered, home network, 5: registered, roaming
                          # Now simply check and return network signal strength
                          checkCreg = False
                      elif status == 3:
                          raise InvalidStateException('Network registration denied')
                      elif status == 0:
                          raise InvalidStateException('Device not searching for network operator')
                  else:
                      # Disable network registration check; only use signal strength
                      self.log.info('+CREG check disabled due to invalid response or unsupported command')
                      checkCreg = False
              else:
                  # Check signal strength
                  ss = self.signalStrength
                  if ss > 0:
                      return ss
              time.sleep(1)
          else:
              # If this is reached, the timer task has triggered
              raise TimeoutException()