code: def get_num_gpus(mii_config):
      num_gpus = mii_config.model_config.tensor_parallel
  
      assert (
          torch.cuda.device_count() >= num_gpus
      ), f"Available GPU count: {torch.cuda.device_count()} does not meet the required gpu count: {num_gpus}"
      return num_gpus
  
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 12 for calling a global function with example usage: get_num_gpus(mii_config) and returns: num_gpus