class_docstr: Test InMemoryDocumentStore's specific features
class_docstr_tok: ["Test","InMemoryDocumentStore","'s","specific","features"]
code: def test_bm25_retrieval_with_table_content(
      self, document_store: InMemoryDocumentStore
  ):
      # Tests if the bm25_retrieval method correctly returns a dataframe when the content_type is table.
      table_content = pd.DataFrame(
          {
              "language": ["Python", "Java"],
              "use": ["Data Science", "Web Development"],
          }
      )
      docs = [
          Document(dataframe=table_content),
          Document(content="Gardening"),
          Document(content="Bird watching"),
      ]
      document_store.write_documents(docs)
      results = document_store.bm25_retrieval(query="Java", top_k=1)
      assert len(results) == 1
  
      df = results[0].dataframe
      assert isinstance(df, pd.DataFrame)
      assert df.equals(table_content)
  
imports: import logging
  from unittest.mock import patch
  import pandas
  import pytest
  from haystack import Document
  from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError
  from haystack.document_stores.in_memory import InMemoryDocumentStore
  from haystack.testing.document_store import DocumentStoreBaseTests
label_desc: Use image node_id 13 for calling the TestMemoryDocumentStore obj's underlying member method code with example usage: obj.test_bm25_retrieval_with_table_content(document_store) without return types