code: def check_model_support(
      repo_id: str, headers: Optional[Dict] = None
  ) -> bool:
      """
      Check if a given model is supported by text-generation-inference
  
      Returns:
          bool: whether the model is supported by this client
      """
      resp = requests.get(
          f"https://api-inference.huggingface.co/status/{repo_id}",
          headers=headers,
          timeout=5,
      )
  
      payload = resp.json()
      if resp.status_code != 200:
          raise parse_error(resp.status_code, payload)
  
      framework = payload["framework"]
      supported = framework == "text-generation-inference"
      return supported
  
file_path: text-generation-inference/clients/python/text_generation/inference_api.py
imports: import os
  import requests
  from typing import Dict, Optional, List
  from huggingface_hub.utils import build_hf_headers
  from text_generation import Client, AsyncClient, __version__
  from text_generation.types import DeployedModel
  from text_generation.errors import NotSupportedError, parse_error
label_desc: Use image node_id 2 for calling a global function with example usage: check_model_support(repo_id, headers) and returns: supported