code: def setUp(self):
      self.temp_dir_obj = TemporaryDirectory()
      self.test_checkpoints_path = self.temp_dir_obj.name
  
      self.metric = ConstantMetric()
      self.metric_callback = ConstantMetricCallback(
          self.METRIC_VALUES, self.metric
      )
  
      expt = Experiment(
          self.test_checkpoints_path,
          nn.Linear(1, 1),
          optimizer="sgd",
          loss_function="mse",
          batch_metrics=[self.metric],
          monitor_metric="const",
          monitor_mode=self.MONITOR_MODE,
      )
      train_generator = SomeDataGeneratorWithLen(2, 32, 0)
      expt.train(
          train_generator,
          epochs=self.NUM_EPOCHS,
          callbacks=[self.metric_callback],
      )
  
      self.checkpoint_paths = [
          os.path.join(
              self.test_checkpoints_path,
              f"checkpoint_epoch_{epoch}.ckpt",
          )
          for epoch in self.CHECKPOINT_EPOCHS
      ]
      self.no_checkpoint_paths = [
          os.path.join(
              self.test_checkpoints_path,
              f"checkpoint_epoch_{epoch}.ckpt",
          )
          for epoch in self.NO_CHECKPOINT_EPOCHS
      ]
      self.last_checkpoint_path = os.path.join(
          self.test_checkpoints_path, "checkpoint.ckpt"
      )
      self.test_experiment = Experiment(
          self.test_checkpoints_path,
          nn.Linear(1, 1),
          optimizer="sgd",
          loss_function="mse",
          batch_metrics=[self.metric],
          monitor_metric="const",
          monitor_mode=self.MONITOR_MODE,
      )
  
imports: import os
  from tempfile import TemporaryDirectory
  from unittest import TestCase
  import torch
  from torch import nn
  from poutyne import Experiment
  from tests.framework.experiment.utils import ConstantMetric, ConstantMetricCallback
  from tests.framework.tools import SomeDataGeneratorWithLen
label_desc: Use image node_id 1 for calling the BaseExperimentCheckpointLoadingTest obj's underlying member method code with example usage: obj.setUp() without return types