def __init__(
      self,
      sentence_embedder: Callable[[str], np.ndarray],
      importance: Callable[[str, Sequence[tuple[str, float]]],
                           float] | None = None,
      clock: Callable[[], datetime.datetime] = datetime.datetime.now,
      clock_step_size: datetime.timedelta | None = None,
      seed: int | None = None,
  ):
    """Constructor.

    Args:
      sentence_embedder: text embedding model
      importance: maps a sentence into [0, 1] scale of importance, if None then
        use a constant importance model that sets all memories to importance 1.0
      clock: a callable to get time when adding memories
      clock_step_size: sets the step size of the clock. If None, assumes precise
        time
      seed: optional seed to use for the random number generator. If None, uses
        the default rng.
    """
    self._memory_bank_lock = threading.Lock()
    self._seed = seed
    self._embedder = sentence_embedder
    self._num_to_retrieve_to_contextualize_importance = (
        _NUM_TO_RETRIEVE_TO_CONTEXTUALIZE_IMPORTANCE)
    self._importance = (
        importance or importance_function.ConstantImportanceModel().importance)

    self._memory_bank = pd.DataFrame(
        columns=['text', 'time', 'tags', 'embedding', 'importance']
    )
    self._clock_now = clock
    self._interval = clock_step_size
    self._stored_hashes = set()
Constructor.

    Args:
      sentence_embedder: text embedding model
      importance: maps a sentence into [0, 1] scale of importance, if None then
        use a constant importance model that sets all memories to importance 1.0
      clock: a callable to get time when adding memories
      clock_step_size: sets the step size of the clock. If None, assumes precise
        time
      seed: optional seed to use for the random number generator. If None, uses
        the default rng.
    
concordia/associative_memory/deprecated/associative_memory.py