class_docstr: Test InMemoryDocumentStore's specific features
class_docstr_tok: ["Test","InMemoryDocumentStore","'s","specific","features"]
code: def test_bm25_retrieval_with_scale_score(
      self, document_store: InMemoryDocumentStore
  ):
      docs = [
          Document(content="Python programming"),
          Document(content="Java programming"),
      ]
      document_store.write_documents(docs)
  
      results1 = document_store.bm25_retrieval(
          query="Python", top_k=1, scale_score=True
      )
      # Confirm that score is scaled between 0 and 1
      assert results1[0].score is not None
      assert 0.0 <= results1[0].score <= 1.0
  
      # Same query, different scale, scores differ when not scaled
      results = document_store.bm25_retrieval(
          query="Python", top_k=1, scale_score=False
      )
      assert results[0].score != results1[0].score
  
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 12 for calling the TestMemoryDocumentStore obj's underlying member method code with example usage: obj.test_bm25_retrieval_with_scale_score(document_store) without return types