code: def configure_optimizers(self):
      assert isinstance(
          self.trainer.precision_plugin.scaler,
          torch.cuda.amp.GradScaler,
      )
      return torch.optim.Adam(
          self.parameters(), lr=1.0, fused=self.fused
      )
  
file_path: pytorch-lightning/tests/tests_pytorch/plugins/precision/test_amp_integration.py
imports: from unittest.mock import Mock
  import torch
  from lightning.fabric import seed_everything
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.plugins.precision import MixedPrecision
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 2 for calling the FusedOptimizerParityModel obj's underlying member method code with example usage: obj.configure_optimizers() and returns: torch