code: def test_module_init_context(precision, expected_dtype):
      plugin = HalfPrecision(precision=precision)
      with plugin.module_init_context():
          model = torch.nn.Linear(2, 2)
          assert torch.get_default_dtype() == expected_dtype
      assert model.weight.dtype == expected_dtype
  
imports: import pytest
  import torch
  from lightning.fabric.plugins.precision import HalfPrecision
label_desc: Use image node_id 2 for calling a global function with example usage: test_module_init_context(precision, expected_dtype) without return types