def setup_learner(self):
        """
            Same as run_learner, but returns the Learner instance
            instead of calling learner.main_loop()
        """
        session_config, learner_config, env_config = \
            self.session_config, self.learner_config, self.env_config

        learner_class = self.learner_class
        learner = learner_class(
            learner_config=learner_config,
            env_config=env_config,
            session_config=session_config
        )

        return learner

            Same as run_learner, but returns the Learner instance
            instead of calling learner.main_loop()
        
surreal/launch/launcher.py