code: def _set_default_torch_dtype(dtype: torch.dtype):
      """Sets the default torch dtype to the given dtype."""
      old_dtype = torch.get_default_dtype()
      torch.set_default_dtype(dtype)
      yield
      torch.set_default_dtype(old_dtype)
  
file_path: BigDL/python/llm/src/bigdl/llm/vllm/model_executor/model_loader.py
imports: import contextlib
  from typing import Type
  import torch
  import torch.nn
  from transformers import PretrainedConfig
  from bigdl.llm.vllm.config import ModelConfig
  from bigdl.llm.vllm.model_executor.models.bigdl_llama import BigDLLlamaForCausalLM
  from bigdl.llm.vllm.model_executor.models.bigdl_mixtral import BigDLMixtralForCausalLM
  from bigdl.llm.vllm.model_executor.models.bigdl_mistral import BigDLMistralForCausalLM
  from bigdl.llm.vllm.model_executor.models.bigdl_chatglm import BigDLChatGLMForCausalLM
  from bigdl.llm.utils.common import invalidInputError
label_desc: Use image node_id 1 for calling a global function with example usage: _set_default_torch_dtype(dtype) without return types