code: def test_checkpoint(ray_start_4_cpus):
      """Test that a checkpoint is created and accessible."""
      trainer = DataParallelTrainer(
          train_loop_per_worker=checkpoint_train_func,
          scaling_config=scale_config,
      )
      result = trainer.fit()
      assert (
          load_dict_checkpoint(result.checkpoint)["epoch"]
          == NUM_EPOCHS - 1
      )
  
file_path: ray/python/ray/train/tests/test_data_parallel_trainer_checkpointing.py
imports: import pytest
  import ray
  from ray import train
  from ray.train import CheckpointConfig, RunConfig, ScalingConfig
  from ray.train.data_parallel_trainer import DataParallelTrainer
  from ray.train.tests.util import create_dict_checkpoint, load_dict_checkpoint
label_desc: Use image node_id 3 for calling a global function with example usage: test_checkpoint(ray_start_4_cpus) without return types