code: def test_linear_score_raises_warning_if_doc_wrong_score(
      self, score, caplog
  ):
      ranker = MetaFieldRanker(
          meta_field="rating", ranking_mode="linear_score", weight=0.5
      )
      docs_before = [
          Document(
              id="1", content="abc", meta={"rating": 1.3}, score=score
          ),
          Document(
              id="2", content="abc", meta={"rating": 0.7}, score=0.4
          ),
          Document(
              id="3", content="abc", meta={"rating": 2.1}, score=0.6
          ),
      ]
      with caplog.at_level(logging.WARNING):
          ranker.run(documents=docs_before)
          assert (
              f"The score {score} for Document 1 is outside the [0,1] range; defaulting to 0"
              in caplog.text
          )
  
imports: import pytest
  import logging
  from haystack import Document
  from haystack.components.rankers.meta_field import MetaFieldRanker
label_desc: Use image node_id 17 for calling the TestMetaFieldRanker obj's underlying member method code with example usage: obj.test_linear_score_raises_warning_if_doc_wrong_score(score, caplog) without return types