<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def message_handler(self, target):
 """Decorator to register a mpv script message handler. WARNING: Only one handler can be registered at a time for any given target. To unregister the message handler, call its ``unregister_mpv_messages`` function:: player = mpv.MPV() @player.message_handler('foo') def my_handler(some, args):
 print(args) my_handler.unregister_mpv_messages() """

        def register(handler):
            self._register_message_handler_internal(target, handler)
            handler.unregister_mpv_messages = lambda: self.unregister_message_handler(handler)
            return handler
        return register