@classmethod
    def get_generator_class_by_id(cls, generator_id):
        """Gets a generator class by its id.

        Refreshes once if the generator is not found; subsequently, throws an
        error."""
        if generator_id not in cls.value_generators_dict:
            cls._refresh_registry()
        return cls.value_generators_dict[generator_id]
dataset/ETHPy150Open oppia/oppia/core/domain/value_generators_domain.py/Registry.get_generator_class_by_id/original