code: def mock_check_valid_model():
      with patch(
          "haystack.components.generators.chat.hugging_face_tgi.check_valid_model",
          MagicMock(return_value=None),
      ) as mock:
          yield mock
  
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 1 for calling a global function with example usage: mock_check_valid_model() without return types