def __init__(
      self,
      model: language_model.LanguageModel,
      scenes: Sequence[scene_lib.SceneSpec],
      observation_component_key: str = (
          make_observation_component_module.DEFAULT_MAKE_OBSERVATION_COMPONENT_KEY
      ),
      memory_component_key: str = (
          memory_component_module.DEFAULT_MEMORY_COMPONENT_KEY
      ),
      terminator_component_key: str = (
          terminate_component_module.DEFAULT_TERMINATE_COMPONENT_KEY
      ),
      default_next_game_master_name: str = DEFAULT_NEXT_GAME_MASTER_NAME,
      pre_act_label: str = DEFAULT_SCENE_TRACKER_PRE_ACT_LABEL,
      verbose: bool = False,
  ):
    """Initializes the component.

    Args:
      model: The language model to use for the component.
      scenes: All scenes to be used in the episode.
      observation_component_key: The name of the observation component.
      memory_component_key: The name of the memory component.
      terminator_component_key: The name of the terminator component.
      default_next_game_master_name: The name of the next game master to use in
        cases where the scene does not specify a game master.
      pre_act_label: Prefix to add to the output of the component when called in
        `pre_act`.
      verbose: Whether to print verbose debug information.
    """
    super().__init__()
    self._model = model
    self._pre_act_label = pre_act_label
    self._memory_component_key = memory_component_key
    self._observation_component_key = observation_component_key
    self._terminator_component_key = terminator_component_key
    self._default_next_game_master_name = default_next_game_master_name
    self._scenes = scenes
    self._verbose = verbose

    self._round_idx_to_scene = {}
    round_idx = 0
    for scene in self._scenes:
      for idx in range(scene.num_rounds):
        self._round_idx_to_scene[round_idx] = {'scene': scene,
                                               'step_within_scene': idx}
        round_idx += 1

    self._max_rounds = round_idx
Initializes the component.

    Args:
      model: The language model to use for the component.
      scenes: All scenes to be used in the episode.
      observation_component_key: The name of the observation component.
      memory_component_key: The name of the memory component.
      terminator_component_key: The name of the terminator component.
      default_next_game_master_name: The name of the next game master to use in
        cases where the scene does not specify a game master.
      pre_act_label: Prefix to add to the output of the component when called in
        `pre_act`.
      verbose: Whether to print verbose debug information.
    
concordia/components/game_master/scene_tracker.py