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