def topic(channel, topic=None, prefix='', msg=None):
    if conf.supybot.protocols.irc.strictRfc():
        assert isChannel(channel), repr(channel)
    if msg and not prefix:
        prefix = msg.prefix
    if topic is None:
        return IrcMsg(prefix=prefix, command='TOPIC',
                      args=(channel,), msg=msg)
    else:
        if minisix.PY2 and isinstance(topic, unicode):
            topic = topic.encode('utf8')
        assert isinstance(topic, str)
        return IrcMsg(prefix=prefix, command='TOPIC',
                      args=(channel, topic), msg=msg)
Returns a TOPIC for channel with the topic topic.
dataset/ETHPy150Open ProgVal/Limnoria/src/ircmsgs.py/topic