code: def test_double_precision():
      fabric = Fabric(devices=1, precision="64-true")
  
      with fabric.init_module():
          model = BoringDoubleModule()
      optimizer = torch.optim.Adam(model.parameters(), lr=0.1)
      model, optimizer = fabric.setup(model, optimizer)
  
      batch = torch.rand(2, 32, device=fabric.device)
      assert (
          model.layer.weight.dtype
          == model.layer.bias.dtype
          == torch.float64
      )
      assert model.complex_buffer.dtype == torch.complex128
  
      assert batch.dtype == torch.float32
      output = model(batch)
      assert output.dtype == torch.float32
      loss = torch.nn.functional.mse_loss(
          output, torch.ones_like(output)
      )
      fabric.backward(loss)
      assert model.layer.weight.grad.dtype == torch.float64
      optimizer.step()
      optimizer.zero_grad()
  
file_path: pytorch-lightning/tests/tests_fabric/plugins/precision/test_double_integration.py
imports: import torch
  import torch.nn
  from lightning.fabric import Fabric
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 1 for calling a global function with example usage: test_double_precision() without return types