code: def test_prehemption_during_training(self) -> None:
      with in_temporary_directory() as temp_dir:
          config = self._create_dino_pretraining_config(
              with_mixed_precision=False, gpu_count=2
          )
          result = run_integration_test(config)
          losses_before = result.get_losses()
  
          temp_dir_content = os.listdir(temp_dir)
          self.assertIn(
              "model_final_checkpoint_phase3.torch", temp_dir_content
          )
          os.remove("model_final_checkpoint_phase3.torch")
          os.remove("checkpoint.torch")
          os.remove("log.txt")
  
          result = run_integration_test(config)
          losses_after = result.get_losses()
          print(losses_before)
          print(losses_after)
          self.assertAlmostEqual(
              losses_after[-1], losses_before[-1], places=5
          )
  
file_path: vissl/tests/test_dino_deit.py
imports: import os
  import unittest
  from vissl.utils.hydra_config import compose_hydra_configuration, convert_to_attrdict
  from vissl.utils.test_utils import gpu_test, in_temporary_directory, run_integration_test
label_desc: Use image node_id 6 for calling the TestDINO_DEIT obj's underlying member method code with example usage: obj.test_prehemption_during_training() without return types