<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def on_raw_notice(self, message):
 """ Modify NOTICE to redirect CTCP messages. """

        nick, metadata = self._parse_user(message.source)
        target, msg = message.params

        if is_ctcp(msg):
            self._sync_user(nick, metadata)
            type, response = parse_ctcp(msg)

            # Find dedicated handler if it exists.
            attr = 'on_ctcp_' + pydle.protocol.identifierify(type) + '_reply'
            if hasattr(self, attr):
                await getattr(self, attr)(user, target, response)
            # Invoke global handler.
            await self.on_ctcp_reply(user, target, type, response)
        else:
            await super().on_raw_notice(message)