def _make_pre_act_value(self) -> str:
    """Returns the latest observations to preact."""
    memory = self.get_entity().get_component(
        self._memory_component_name,
        type_=memory_component.MemoryComponent)
    interval_scorer = legacy_associative_memory.RetrieveTimeInterval(
        time_from=self._clock_now() - self._timeframe,
        time_until=self._clock_now(),
        add_time=True,
    )
    mems = memory.retrieve(scoring_fn=interval_scorer)
    # Remove memories that are not observations.
    mems = [mem.text for mem in mems if '[observation]' in mem.text]
    result = '\n'.join(mems) + '\n'
    self._logging_channel(
        {'Key': self.get_pre_act_key(), 'Value': result.splitlines()})

    return result
Returns the latest observations to preact.
concordia/components/agent/deprecated/observation.py