def wait_callback(self, callback, msg_type=None, timeout=<NUM_LIT:1.0>):
event = threading.Event()<EOL>def cb(msg, **metadata):<EOL><INDENT>callback(msg, **metadata)<EOL>event.set()<EOL><DEDENT>self.add_callback(cb, msg_type)<EOL>event.wait(timeout)<EOL>self.remove_callback(cb, msg_type)<EOL>
Wait for a SBP message with a callback.

Parameters
----------
callback : fn
  Callback function
msg_type : int | iterable
  Message type to register callback against. Default `None` means global callback.
  Iterable type adds the callback to all the message types.
timeout : float
  Waiting period