def dispatch(msg, table=_SBP_TABLE):
try:<EOL><INDENT>return table[msg.msg_type](msg)<EOL><DEDENT>except KeyError:<EOL><INDENT>warn = "<STR_LIT>"% (msg.msg_type, msg)<EOL>warnings.warn(warn, RuntimeWarning)<EOL>return msg<EOL><DEDENT>except FormatFieldError:<EOL><INDENT>warnings.warn("<STR_LIT>" % msg.msg_type,<EOL>RuntimeWarning)<EOL>return msg<EOL><DEDENT>
Dispatch an SBP message type based on its `msg_type` and parse its
payload.

Parameters
----------
driver : :class:`SBP`
  A parsed SBP object.
table : dict
  Any table mapping unique SBP message type IDs to SBP message
  constructors.

Returns
----------
SBP message with a parsed payload.