class_docstr: Stores data in-memory. It's ephemeral and cannot be saved to disk.
docstr: Returns the documents that match the filters provided.
  
  For a detailed specification of the filters, refer to the DocumentStore.filter_documents() protocol documentation.
  
  :param filters: The filters to apply to the document list.
  :return: A list of Documents that match the given filters.
docstr_tok: ["Returns","the","documents","that","match","the","filters","provided",".","For","a","detailed","specification","of","the","filters",",","refer","to","the","DocumentStore.filter_documents","(",")","protocol","documentation",".",":","param","filters",":","The","filters","to","apply","to","the","document","list",".",":","return",":","A","list","of","Documents","that","match","the","given","filters","."]
code: def filter_documents(
      self, filters: Optional[Dict[str, Any]] = None
  ) -> List[Document]:
      """
      Returns the documents that match the filters provided.
  
      For a detailed specification of the filters, refer to the DocumentStore.filter_documents() protocol documentation.
  
      :param filters: The filters to apply to the document list.
      :return: A list of Documents that match the given filters.
      """
      if filters:
          if "operator" not in filters and "conditions" not in filters:
              filters = convert(filters)
          return [
              doc
              for doc in self.storage.values()
              if document_matches_filter(filters=filters, document=doc)
          ]
      return list(self.storage.values())
  
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 5 for calling the InMemoryDocumentStore obj's underlying member method code with example usage: obj.filter_documents(filters) and returns: list, unknown