code: def log_cuda_info(scope_name: str):
      ray_serve_logger.info(
          f" {scope_name}: ray.get_gpu_ids(): {ray.get_gpu_ids()}"
      )
      ray_serve_logger.info(
          f" {scope_name}: CUDA_VISIBLE_DEVICES: {os.getenv('CUDA_VISIBLE_DEVICES', 'NO DEVICES FOUND!')}"
      )
      if torch.cuda.is_available():
          ray_serve_logger.info(
              f" {scope_name}: cuda current_device: {torch.cuda.current_device()}, cuda device count: {torch.cuda.device_count()}"
          )
      else:
          ray_serve_logger.info(
              f" {scope_name}: cuda is not available!"
          )
  
imports: import logging
  import os
  from typing import Any, List, Union
  import ray
  import ray.util.collective
  import starlette
  import torch
  from pydantic import BaseModel
  from ray import serve
  from ray.serve import Application
  from transformers import AutoModelForCausalLM, AutoTokenizer
  import colossalai
  from colossalai.inference.tensor_parallel.engine import TPInferEngine
  from colossalai.shardformer import ShardConfig
  from colossalai.testing import free_port
label_desc: Use image node_id 1 for calling a global function with example usage: log_cuda_info(scope_name) without return types