class_docstr: Stores data in-memory. It's ephemeral and cannot be saved to disk.
docstr: Serializes this store to a dictionary.
docstr_tok: ["Serializes","this","store","to","a","dictionary","."]
code: def to_dict(self) -> Dict[str, Any]:
      """
      Serializes this store to a dictionary.
      """
      return default_to_dict(
          self,
          bm25_tokenization_regex=self._bm25_tokenization_regex,
          bm25_algorithm=self.bm25_algorithm.__name__,
          bm25_parameters=self.bm25_parameters,
          embedding_similarity_function=self.embedding_similarity_function,
      )
  
imports: import re
  from typing import Literal, Any, Dict, List, Optional, Iterable
  import logging
  import numpy
  from haystack_bm25 import rank_bm25
  from tqdm.auto import tqdm
  from haystack import default_from_dict, default_to_dict
  from haystack.dataclasses import Document
  from haystack.document_stores.types import DuplicatePolicy
  from haystack.utils.filters import document_matches_filter, convert
  from haystack.document_stores.errors import DuplicateDocumentError, DocumentStoreError
  from haystack.utils import expit
label_desc: Use image node_id 2 for calling the InMemoryDocumentStore obj's underlying member method code with example usage: obj.to_dict() and returns: default_to_dict