def get_pre_act_value(self) -> str:
    """Gets the pre-act value.

    Returns:
      The pre-act value, as created by `_make_pre_act_value`. Note that
      `pre_act` returns a string of the form f'{key}: {value}'.

    Raises:
      ValueError: If the entity is not in the `PRE_ACT` or `POST_ACT` phase.
    """
    if (
        self.get_entity().get_phase() != entity_component.Phase.PRE_ACT
        and self.get_entity().get_phase() != entity_component.Phase.POST_ACT
    ):
      raise ValueError(
          "You can only access the pre-act value in the `PRE_ACT` or "
          "`POST_ACT` phase. The entity is currently in the "
          f"{self.get_entity().get_phase()} phase.")

    with self._lock:
      if self._pre_act_value is None:
        self._pre_act_value = self._make_pre_act_value()
      return self._pre_act_value
Gets the pre-act value.

    Returns:
      The pre-act value, as created by `_make_pre_act_value`. Note that
      `pre_act` returns a string of the form f'{key}: {value}'.

    Raises:
      ValueError: If the entity is not in the `PRE_ACT` or `POST_ACT` phase.
    
concordia/components/agent/deprecated/action_spec_ignored.py