Is this better? It's different, anyway.

    def init_response_generator(self):   
        resp_generator_cls = resp_generator_cls or self. resp_generator_cls
        if not resp_generator_cls:
            raise Error('No response generator found')
        self.response_generator = resp_generator_cls(self.config, self.test_dir)