Set the warning message callback.

def warning_msg_callback(self, callback):
        """Set the warning message callback."""
        if callable(callback):
            self._warning_msg_callback = callback
        else:
            self._warning_msg_callback = None