code: def test_on_device(device):
      if device == "meta" and pkg_version.parse(
          torch.__version__
      ) < pkg_version.parse("1.10"):
          pytest.skip(
              "meta tensors only became stable after torch 1.10"
          )
  
      with OnDevice(dtype=torch.half, device=device):
          model = SimpleModel(4)
  
      for p in model.parameters():
          assert p.device == torch.device(device)
          assert p.dtype == torch.half
  
imports: import torch
  import pytest
  from unit.simple_model import SimpleModel
  from deepspeed import OnDevice
  from packaging import version
label_desc: Use image node_id 1 for calling a global function with example usage: test_on_device(device) without return types