code: def test_generate_text_with_custom_generation_parameters(
      self,
      mock_check_valid_model,
      mock_auto_tokenizer,
      mock_text_generation,
      chat_messages,
  ):
      # Create an instance of HuggingFaceRemoteGenerator with no generation parameters
      generator = HuggingFaceTGIChatGenerator()
      generator.warm_up()
  
      # but then we pass them in run
      generation_kwargs = {"temperature": 0.8, "max_new_tokens": 100}
      response = generator.run(
          chat_messages, generation_kwargs=generation_kwargs
      )
  
      # again check kwargs passed to text_generation
      _, kwargs = mock_text_generation.call_args
      assert kwargs == {
          "details": True,
          "max_new_tokens": 100,
          "stop_sequences": [],
          "temperature": 0.8,
      }
  
      # Assert that the response contains the generated replies and the right response
      assert "replies" in response
      assert isinstance(response["replies"], list)
      assert len(response["replies"]) > 0
      assert [
          isinstance(reply, ChatMessage)
          for reply in response["replies"]
      ]
      assert response["replies"][0].content == "I'm fine, thanks."
  
imports: from unittest.mock import patch, MagicMock, Mock
  import pytest
  from huggingface_hub.inference._text_generation import TextGenerationStreamResponse, Token, StreamDetails, FinishReason
  from huggingface_hub.utils import RepositoryNotFoundError
  from haystack.components.generators.chat import HuggingFaceTGIChatGenerator
  from haystack.dataclasses import StreamingChunk, ChatMessage
label_desc: Use image node_id 13 for calling the TestHuggingFaceTGIChatGenerator obj's underlying member method code with example usage: obj.test_generate_text_with_custom_generation_parameters(mock_check_valid_model, mock_auto_tokenizer, mock_text_generation, chat_messages) without return types