code: def test_save_load_checkpoint_path_class(
      ray_start_2_cpus, return_type, tmpdir
  ):
      """Assert that restoring from a Trainable.save() future works with
      class trainables.
  
      Needs Ray cluster so we get actual futures.
      """
      trainable = ray.remote(SavingTrainable).remote(
          return_type=return_type
      )
  
      # Train one step
      ray.get(trainable.train.remote())
  
      # Save checkpoint
      saving_future = trainable.save.remote()
  
      # Check for errors
      ray.get(saving_future)
  
      restoring_future = trainable.restore.remote(saving_future)
  
      ray.get(restoring_future)
  
imports: import json
  import os
  from typing import Dict, Union
  import pytest
  import ray
  from ray import train, tune
  from ray.train._internal.storage import StorageContext
  from ray.tune.trainable import wrap_function
  from ray.train.tests.util import create_dict_checkpoint
label_desc: Use image node_id 3 for calling a global function with example usage: test_save_load_checkpoint_path_class(ray_start_2_cpus, return_type, tmpdir) without return types