code: def _setup_exercise(game_interface: GameInterface, ex: Exercise, seed: int) -> Optional[Result]:
      
      rng = random.Random()
      rng.seed(seed)
      try:
          game_state = ex.setup(rng)
      except Exception as e:
          return Result(ex, seed, FailDueToExerciseException(e, traceback.format_exc()))
      game_interface.set_game_state(game_state)
docs: Set the game state.
      Only returns a result if there was an error in ex.setup()