code: def validate_device(tensor: torch.Tensor):
      assert tensor.device == torch.device(
          get_accelerator().current_device()
      )
  
file_path: DeepSpeed/tests/unit/inference/v2/model_implementations/parameters/utils.py
imports: import torch
  from deepspeed.accelerator import get_accelerator
  from deepspeed.inference.v2.allocator import on_device
  from deepspeed.inference.v2.inference_parameter import InferenceParameter
  from deepspeed.inference.v2.model_implementations.parameter_base import ParameterBase, ParametrizedList
label_desc: Use image node_id 1 for calling a global function with example usage: validate_device(tensor) without return types