code: def test_document_store_class_with_documents_and_documents_count():
      doc = Document(id="fake_id", content="This is a document")
      MyStore = document_store_class(
          "MyStore", documents=[doc], documents_count=100
      )
      store = MyStore()
      assert store.count_documents() == 100
      assert store.filter_documents() == [doc]
  
file_path: haystack/test/testing/test_factory.py
imports: import pytest
  from haystack.dataclasses import Document
  from haystack.testing.factory import document_store_class, component_class
  from haystack.core.component import component
label_desc: Use image node_id 5 for calling a global function with example usage: test_document_store_class_with_documents_and_documents_count() without return types