code: def test_to_dict(self):
      MyFakeStore = document_store_class(
          "MyFakeStore", bases=(InMemoryDocumentStore,)
      )
      document_store = MyFakeStore()
      document_store.to_dict = lambda: {
          "type": "MyFakeStore",
          "init_parameters": {},
      }
      component = InMemoryBM25Retriever(document_store=document_store)
  
      data = component.to_dict()
      assert data == {
          "type": "haystack.components.retrievers.in_memory.bm25_retriever.InMemoryBM25Retriever",
          "init_parameters": {
              "document_store": {
                  "type": "MyFakeStore",
                  "init_parameters": {},
              },
              "filters": None,
              "top_k": 10,
              "scale_score": False,
          },
      }
  
imports: from typing import Dict, Any
  import pytest
  from haystack import Pipeline, DeserializationError
  from haystack.testing.factory import document_store_class
  from haystack.components.retrievers.in_memory import InMemoryBM25Retriever
  from haystack.dataclasses import Document
  from haystack.document_stores.in_memory import InMemoryDocumentStore
label_desc: Use image node_id 4 for calling the TestMemoryBM25Retriever obj's underlying member method code with example usage: obj.test_to_dict() without return types