def retrieve_random_with_importance(
      self,
      k: int = 1,
  ) -> Sequence[tuple[str, float]]:
    """Retrieve random memories and return importance alongside.

    Args:
      k: number of entries to retrieve

    Returns:
      List of tuples of (memory, importance)
    """
    with self._memory_bank_lock:
      data = self._memory_bank.sample(k, random_state=self._seed)
    return tuple(zip(list(data['text']), list(data['importance'])))
Retrieve random memories and return importance alongside.

    Args:
      k: number of entries to retrieve

    Returns:
      List of tuples of (memory, importance)
    
concordia/associative_memory/deprecated/associative_memory.py