<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 set_topic(self, channel, topic):
 """ Set topic on channel. Users should only rely on the topic actually being changed when receiving an on_topic_change callback. """

        if not self.is_channel(channel):
            raise ValueError('Not a channel: {}'.format(channel))
        elif not self.in_channel(channel):
            raise NotInChannel(channel)

        await self.rawmsg('TOPIC', channel, topic)