<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_message_handler(self, handler_name, handler_type='primary'):
 """Returns the MessageHandler given its name and type for this class."""

        ret = lib.EnvFindDefmessageHandler(
            self._env, self._cls, handler_name.encode(), handler_type.encode())
        if ret == 0:
            raise CLIPSError(self._env)

        return MessageHandler(self._env, self._cls, ret)