code: def run(self, oneshot=False):
          
          if not self.xbee:
              raise ValueError("Either a serial port or an XBee must be provided \
                               to __init__ to execute run()")
  
          while True:
              self.dispatch(self.xbee.wait_read_frame())
  
              if oneshot:
                  break
docs: run: boolean -> None
  
          run will read and dispatch any packet which arrives from the
          XBee device