code: def on_test_end(
      self, trainer: pl.Trainer, pl_module: pl.LightningModule
  ):
      save_json(pl_module.metrics, pl_module.metrics_save_path)
      return self._write_logs(trainer, pl_module, "test")
  
file_path: transformers/examples/research_projects/rag-end2end-retriever/callbacks_rag.py
imports: import logging
  from pathlib import Path
  import numpy
  import pytorch_lightning
  import torch
  from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
  from pytorch_lightning.utilities import rank_zero_only
  from utils_rag import save_json
label_desc: Use image node_id 4 for calling the Seq2SeqLoggingCallback obj's underlying member method code with example usage: obj.on_test_end(trainer, pl_module) and returns: self