code: def on_validation_end(
      self, trainer: "pl.Trainer", pl_module: "pl.LightningModule"
  ) -> None:
      ema_callback = [
          x for x in trainer.callbacks if isinstance(x, EMA)
      ][0]
      if not ema_callback.validate_original_weights:
          model_weights = extract_weights(pl_module)
          if ema_callback._ema_initialized:
              for orig_weights, module_weights in zip(
                  self._original_weights, model_weights
              ):
                  torch.allclose(
                      orig_weights.cpu(), module_weights.cpu()
                  )
  
imports: import os.path
  from typing import Any, Dict, Union
  import pytest
  import pytorch_lightning
  import torch
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Callback, Trainer
  from pytorch_lightning.utilities.exceptions import MisconfigurationException
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from nemo.collections.common.callbacks import EMA
  from nemo.collections.common.callbacks.ema import EMAOptimizer
  from nemo.core import ModelPT
  from nemo.utils.exp_manager import exp_manager
label_desc: Use image node_id 2 for calling the EMAValidationAssertCallback obj's underlying member method code with example usage: obj.on_validation_end(trainer, pl_module) without return types