code: def test_to_dict_with_quantization_config(self):
      component = HuggingFaceLocalGenerator(
          model="gpt2",
          task="text-generation",
          device="cuda:0",
          token="test-token",
          generation_kwargs={"max_new_tokens": 100},
          stop_words=["coca", "cola"],
          huggingface_pipeline_kwargs={
              "model_kwargs": {
                  "quantization_config": {
                      "load_in_4bit": True,
                      "bnb_4bit_use_double_quant": True,
                      "bnb_4bit_quant_type": "nf4",
                      "bnb_4bit_compute_dtype": torch.bfloat16,
                  }
              }
          },
      )
      data = component.to_dict()
  
      assert data == {
          "type": "haystack.components.generators.hugging_face_local.HuggingFaceLocalGenerator",
          "init_parameters": {
              "huggingface_pipeline_kwargs": {
                  "model": "gpt2",
                  "task": "text-generation",
                  "device": "cuda:0",
                  "model_kwargs": {
                      "quantization_config": {
                          "load_in_4bit": True,
                          "bnb_4bit_use_double_quant": True,
                          "bnb_4bit_quant_type": "nf4",
                          # dtype is correctly serialized
                          "bnb_4bit_compute_dtype": "torch.bfloat16",
                      }
                  },
              },
              "generation_kwargs": {
                  "max_new_tokens": 100,
                  "return_full_text": False,
              },
              "stop_words": ["coca", "cola"],
          },
      }
  
imports: from unittest.mock import patch, Mock
  import pytest
  import torch
  from transformers import PreTrainedTokenizerFast
  from haystack.components.generators.hugging_face_local import HuggingFaceLocalGenerator, StopWordsCriteria
label_desc: Use image node_id 14 for calling the TestHuggingFaceLocalGenerator obj's underlying member method code with example usage: obj.test_to_dict_with_quantization_config() without return types