code: def test_module_init_context():
      plugin = DoublePrecision()
      with plugin.module_init_context():
          model = torch.nn.Linear(2, 2)
          assert torch.get_default_dtype() == torch.double
      assert model.weight.dtype == torch.double
  
imports: import pickle
  from unittest.mock import MagicMock
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from lightning.pytorch.plugins.precision.double import DoublePrecision
  from torch.utils.data import DataLoader, Dataset
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 5 for calling a global function with example usage: test_module_init_context() without return types