def get_topic_id(self, topic_url):
        group, topic = topic_url.strip('/').split('/')
        group_id = self.get_group_id(group)
        if not self.topic_lookup in group:
            last_id, topics = self.get_group_topics_batch(group_id)
            # topics contains a simple dictionary of slug:id
            # print topics
            topics_slug_indexed = self.topics_by_slug(topics)
            topics_id_indexed = self.topics_by_id(topics)

            # TODO - the above is not all wrong - and maybe not needed
            # topics_by_slug = topics
            self.topic_lookup[group] = {'last_until_id':last_id, 'topic_by_slug':topics_slug_indexed}
            self.topic_lookup[group]['topic_by_id'] = topics_id_indexed

            # print self.topic_lookup[group]
        found = False
        while not found:
            if topic in self.topic_lookup[group]['topic_by_slug']:
                return self.topic_lookup[group]['topic_by_slug'][topic]['id']
            elif self.topic_lookup[group]['last_until_id']:
                last_id, topics = self.get_group_topics_batch(group_id, self.topic_lookup[group]['last_until_id'])
                topics_slug_indexed = self.topics_by_slug(topics)
                topics_id_indexed = self.topics_by_id(topics)
                self.topic_lookup[group]['last_until_id'] = last_id
                self.topic_lookup[group]['topic_by_slug'].update(topics_slug_indexed)
                self.topic_lookup[group]['topic_by_id'].update(topics_id_indexed)
            else:
                return False
dataset/ETHPy150Open ptone/notifyore/notifyore/convore.py/EnhancedConvore.get_topic_id/swapped operands of `in`