class_docstr: TD [2021-08-31]: saving and loading from checkpoint should work.
      
class_docstr_tok: ["TD","[","2021-08-31","]",":","saving","and","loading","from","checkpoint","should","work","."]
code: def on_test_end(
      self, trainer: "pl.Trainer", pl_module: "pl.LightningModule"
  ) -> None:
      if self.ema is not None:
          self.ema.restore()
  
file_path: flash-attention/training/src/callbacks/ema.py
imports: from typing import Dict, Any
  from pytorch_lightning import Callback, Trainer
  from pytorch_lightning.utilities import rank_zero_only
  from pytorch_lightning.utilities.parsing import AttributeDict
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from src.utils.ema import ExponentialMovingAverage
label_desc: Use image node_id 7 for calling the EMACallback obj's underlying member method code with example usage: obj.on_test_end(trainer, pl_module) without return types