code: def test_dtype_conversions():
      module = ExampleModule(torch.tensor(1))
      # different dtypes
      assert module.weight.dtype is torch.int64
      assert module.dtype is torch.float32
      # `.double()` skips non floating points
      module.double()
      assert module.weight.dtype is torch.int64
      assert module.dtype is torch.float64
      # but `type` doesn't
      module.type(torch.float)
      assert module.weight.dtype is torch.float32
      assert module.dtype is torch.float32
      # now, test the rest
      module.float()
      assert module.weight.dtype is torch.float32
      assert module.dtype is torch.float32
      module.half()
      assert module.weight.dtype is torch.float16
      assert module.dtype is torch.float16
  
imports: import pytest
  import torch
  from lightning.fabric.utilities.device_dtype_mixin import _DeviceDtypeModuleMixin
  from torch import nn
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 6 for calling a global function with example usage: test_dtype_conversions() without return types