code: def checkpoint_train_func():
      for i in range(NUM_EPOCHS):
          with create_dict_checkpoint({"epoch": i}) as checkpoint:
              train.report({"epoch": i}, checkpoint=checkpoint)
  
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 2 for calling a global function with example usage: checkpoint_train_func() without return types