code: def test_run_with_pipeline_and_top_k(
      self, mock_docs, query: str, query_result: str, top_k: int
  ):
      ds = InMemoryDocumentStore()
      ds.write_documents(mock_docs)
      retriever = InMemoryBM25Retriever(ds)
  
      pipeline = Pipeline()
      pipeline.add_component("retriever", retriever)
      result: Dict[str, Any] = pipeline.run(
          data={"retriever": {"query": query, "top_k": top_k}}
      )
  
      assert result
      assert "retriever" in result
      results_docs = result["retriever"]["documents"]
      assert results_docs
      assert len(results_docs) == 1
      assert results_docs[0].content == query_result
  
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 13 for calling the TestMemoryBM25Retriever obj's underlying member method code with example usage: obj.test_run_with_pipeline_and_top_k(mock_docs, query, query_result, top_k) without return types