code: def test_basic_checkpoint(self):
      p = torch.tensor([2.0, 1.0, 10.0])
      training_steps = 500
  
      model = Net(p)
      optim = torch.optim.SGD(model.parameters(), lr=0.01)
  
      trial = (
          torchbearer.Trial(
              model,
              optim,
              loss,
              callbacks=[
                  torchbearer.callbacks.MostRecent(filepath="test.pt")
              ],
          )
          .for_train_steps(training_steps)
          .for_val_steps(1)
      )
      trial.run(2)  # Simulate 2 'epochs'
  
      # Reload
      p = torch.tensor([2.0, 1.0, 10.0])
      model = Net(p)
      optim = torch.optim.SGD(model.parameters(), lr=0.01)
  
      trial = torchbearer.Trial(
          model,
          optim,
          loss,
          callbacks=[
              torchbearer.callbacks.MostRecent(filepath="test.pt")
          ],
      ).for_train_steps(training_steps)
      trial.load_state_dict(torch.load("test.pt"))
      self.assertEqual(len(trial.state[torchbearer.HISTORY]), 2)
      self.assertAlmostEqual(model.pars[0].item(), 5.0, places=4)
      self.assertAlmostEqual(model.pars[1].item(), 0.0, places=4)
      self.assertAlmostEqual(model.pars[2].item(), 1.0, places=4)
  
      import os
  
      os.remove("test.pt")
  
imports: import unittest
  import torch
  from torch.nn import Module, Linear
  import torch.nn.init
  import torchbearer
  from torchbearer import callbacks
label_desc: Use image node_id 4 for calling the TestEndToEnd obj's underlying member method code with example usage: obj.test_basic_checkpoint() without return types