def __init__(
      self,
      history_length: int,
      memory_component_key: str = (
          memory_component.DEFAULT_MEMORY_COMPONENT_KEY
      ),
      pre_act_label: str = DEFAULT_OBSERVATION_PRE_ACT_LABEL,
  ):
    """Initializes the observation component.

    Args:
      history_length: The maximum number of observations to retrieve in
        `pre_act`.
      memory_component_key: Name of the memory component to add observations to
        in `pre_observe` and to retrieve observations from in `pre_act`.
      pre_act_label: Prefix to add to the output of the component when called in
        `pre_act`.
    """
    super().__init__(pre_act_label)
    self._memory_component_key = memory_component_key
    self._history_length = history_length
Initializes the observation component.

    Args:
      history_length: The maximum number of observations to retrieve in
        `pre_act`.
      memory_component_key: Name of the memory component to add observations to
        in `pre_observe` and to retrieve observations from in `pre_act`.
      pre_act_label: Prefix to add to the output of the component when called in
        `pre_act`.
    
concordia/components/agent/observation.py