code: def check_if_task_and_model_is_supported(task, model_name):
      supported_models = get_supported_models(task)
      assert (
          model_name in supported_models
      ), f"{task} is not supported by {model_name}. This task is supported by {len(supported_models)} other models. See which models with `mii.get_supported_models(mii.{task})`."
  
imports: import os
  import pickle
  import time
  import importlib
  import torch
  import mii.legacy
  from types import SimpleNamespace
  from huggingface_hub import HfApi
  from mii.legacy.models.score.generate import generated_score_path
  from mii.legacy.constants import MII_CACHE_PATH, MII_CACHE_PATH_DEFAULT, ModelProvider, SUPPORTED_MODEL_TYPES, REQUIRED_KEYS_PER_TASK, MII_HF_CACHE_EXPIRATION, MII_HF_CACHE_EXPIRATION_DEFAULT
  from mii.legacy.config import TaskType
label_desc: Use image node_id 3 for calling a global function with example usage: check_if_task_and_model_is_supported(task, model_name) without return types