@classmethod
    def _refresh_registry(cls):
        cls.value_generators_dict.clear()

        # Assemble all generators in
        # extensions/value_generators/models/generators.py.
        value_generator_paths = [os.path.join(
            os.getcwd(), feconf.VALUE_GENERATORS_DIR, 'models')]

        # Crawl the directories and add new generator instances to the
        # registries.
        for loader, name, _ in pkgutil.iter_modules(
                path=value_generator_paths):
            if name.endswith('_test'):
                continue
            module = loader.find_module(name).load_module(name)
            for name, clazz in inspect.getmembers(module, inspect.isclass):
                if issubclass(clazz, BaseValueGenerator):
                    if clazz.__name__ in cls.value_generators_dict:
                        raise Exception(
                            'Duplicate value generator name %s'
                            % clazz.__name__)

                    cls.value_generators_dict[clazz.__name__] = clazz
dataset/ETHPy150Open oppia/oppia/core/domain/value_generators_domain.py/Registry._refresh_registry/original