def see_every_content_types(msg):
    global expected_content_type, content_type_iterator

    flavor = telepot.flavor(msg)

    if flavor == 'chat':
        content_type, chat_type, chat_id = telepot.glance(msg)
        from_id = msg['from']['id']

        if chat_id != USER_ID and from_id != USER_ID:
            print 'Unauthorized user:', chat_id, from_id
            return

        examine(msg, telepot.namedtuple.Message)
        try:
            if content_type == expected_content_type:
                expected_content_type = content_type_iterator.next()
                bot.sendMessage(chat_id, 'Please give me a %s.' % expected_content_type)
            else:
                bot.sendMessage(chat_id, (expected_content_type, expected_content_type) % 'It is not a %s. Please give me a %s, please.')
        except StopIteration:
            # reply to sender because I am kicked from group already
            bot.sendMessage(from_id, 'Thank you. I am done.')

    else:
        raise telepot.BadFlavor(msg)
dataset/ETHPy150Open nickoala/telepot/test/test27_updates.py/see_every_content_types/swapped operands of `%`