code: def sendUssd(self, ussdString, responseTimeout=15):
          
          self._ussdSessionEvent = threading.Event()
          try:
              cusdResponse = self.write('AT+CUSD=1,"{0}",15'.format(ussdString), timeout=responseTimeout) # Should respond with "OK"
          except Exception:
              self._ussdSessionEvent = None # Cancel the thread sync lock
              raise
  
          # Some modems issue the +CUSD response before the acknowledgment "OK" - check for that
          if len(cusdResponse) > 1:
              cusdResponseFound = lineStartingWith('+CUSD', cusdResponse) != None
              if cusdResponseFound:
                  self._ussdSessionEvent = None # Cancel thread sync lock
                  return self._parseCusdResponse(cusdResponse)
          # Wait for the +CUSD notification message
          if self._ussdSessionEvent.wait(responseTimeout):
              self._ussdSessionEvent = None
              return self._ussdResponse
          else: # Response timed out
              self._ussdSessionEvent = None            
              raise TimeoutException()
docs: Starts a USSD session by dialing the the specified USSD string, or \
          sends the specified string in the existing USSD session (if any)
                  
          :param ussdString: The USSD access number to dial
          :param responseTimeout: Maximum time to wait a response, in seconds
          
          :raise TimeoutException: if no response is received in time
          
          :return: The USSD response message/session (as a Ussd object)
          :rtype: gsmmodem.modem.Ussd