code: def on_after_backward(self) -> None:
      # check grads are scaled
      scale = self.trainer.precision_plugin.scaler.get_scale()
      assert scale != 1.0  # the return value if not enabled
      grads = [p.grad for p in self.parameters()]
      inv_scale = 1 / scale
      self.original_grads = [p * inv_scale for p in grads]
  
imports: import os
  import re
  from unittest import mock
  import pytest
  import torch
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.plugins import MixedPrecision
  from torch import Tensor
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 1 for calling the TestPrecisionModel obj's underlying member method code with example usage: obj.on_after_backward() without return types