def remove_callback(self, callback, msg_type=None):
if msg_type is None:<EOL><INDENT>msg_type = self._callbacks.keys()<EOL><DEDENT>cb_keys = self._to_iter(msg_type)<EOL>if cb_keys is not None:<EOL><INDENT>for msg_type_ in cb_keys:<EOL><INDENT>try:<EOL><INDENT>self._callbacks[msg_type_].remove(callback)<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>self._callbacks[msg_type].remove(callback)<EOL><DEDENT>
Remove per message type of global callback.

Parameters
----------
callback : fn
  Callback function
msg_type : int | iterable
  Message type to remove callback from. Default `None` means global callback.
  Iterable type removes the callback from all the message types.