<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_metadata(self, message):
 """ Metadata event. """

        target, targetmeta = self._parse_user(message.params[0])
        key, visibility, value = message.params[1:4]
        if visibility == VISIBLITY_ALL:
            visibility = None

        if target in self.users:
            self._sync_user(target, targetmeta)
        await self.on_metadata(target, key, value, visibility=visibility)