code: def wait(self, msg_type, timeout=1.0):
          
          event = threading.Event()
          payload = {'data': None}
  
          def cb(sbp_msg, **metadata):
              payload['data'] = sbp_msg
              event.set()
  
          self.add_callback(cb, msg_type)
          event.wait(timeout)
          self.remove_callback(cb, msg_type)
          return payload['data']
docs: Wait for a SBP message.
  
          Parameters
          ----------
          msg_type : int
            SBP message type.
          timeout : float
            Waiting period