code: def test_raises_component_error_if_wrong_weight(self, score):
      with pytest.raises(ValueError):
          MetaFieldRanker(meta_field="rating", weight=score)
  
imports: import pytest
  import logging
  from haystack import Document
  from haystack.components.rankers.meta_field import MetaFieldRanker
label_desc: Use image node_id 13 for calling the TestMetaFieldRanker obj's underlying member method code with example usage: obj.test_raises_component_error_if_wrong_weight(score) without return types