def retrieve_random(
      self,
      k: int = 1,
      add_time: bool = False,
  ) -> Sequence[str]:
    """Retrieve random memories.

    Args:
      k: number of entries to retrieve
      add_time: whether to add time stamp to the output

    Returns:
      List of strings corresponding to memories
    """
    with self._memory_bank_lock:
      data = self._memory_bank.sample(k, random_state=self._seed)
    return self._pd_to_text(data, add_time=add_time, sort_by_time=True)
Retrieve random memories.

    Args:
      k: number of entries to retrieve
      add_time: whether to add time stamp to the output

    Returns:
      List of strings corresponding to memories
    
concordia/associative_memory/deprecated/associative_memory.py