<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 join(self, channel, password=None):
 """ Join channel, optionally with password. """

        if self.in_channel(channel):
            raise AlreadyInChannel(channel)

        if password:
            await self.rawmsg('JOIN', channel, password)
        else:
            await self.rawmsg('JOIN', channel)