def create_topics(self, tags, users):
        from solace.models import Topic
        last_date = None
        topics = []
        num, var = {'small': (50, 10), 'medium': (200, 20),
                    'large': (1000, 200)}[self.data_set_size]
        count = 0
        for locale in self.locales:
            for x in xrange(randrange(num - var, num + var)):
                topic = Topic(locale, generate_lorem_ipsum(1, False, 3, 9),
                              generate_lorem_ipsum(randrange(1, 5), False,
                                                   40, 140), choice(users),
                              date=self.get_date(last_date))
                last_date = topic.last_change
                these_tags = list(tags[locale])
                shuffle(these_tags)
                topic.bind_tags(these_tags[:randrange(2, 6)])
                topics.append(topic)
                count += 1
        print 'Generated %d topics in %d locales' % (count, len(self.locales))
        return topics
Find objects by importing modules as needed.
dataset/ETHPy150Open mitsuhiko/solace/solace/scripts.py/MakeTestDataCommand.create_topics--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/descriptor.py/import_descriptor_loader