code: def test_to_dict(self):
      component = MetaFieldRanker(meta_field="rating")
      data = component.to_dict()
      assert data == {
          "type": "haystack.components.rankers.meta_field.MetaFieldRanker",
          "init_parameters": {
              "meta_field": "rating",
              "weight": 1.0,
              "top_k": None,
              "ranking_mode": "reciprocal_rank_fusion",
              "sort_order": "descending",
          },
      }
  
imports: import pytest
  import logging
  from haystack import Document
  from haystack.components.rankers.meta_field import MetaFieldRanker
label_desc: Use image node_id 1 for calling the TestMetaFieldRanker obj's underlying member method code with example usage: obj.test_to_dict() without return types