code: def part(self, channel, reason=''):
          
          with self.lock:
              self.is_in_channel(channel)
  
              self.send('PART %s :%s' % (channel, reason))
              msg = self._recv(expected_replies=('PART',))
              if msg[0] == 'PART':
                  del self.channels[msg[1]]
                  if not self.hide_called_events:
                      self.stepback()
docs: Part a channel.
          Required arguments:
          * channel - Channel to part.
          Optional arguments:
          * reason='' - Reason for parting.