code: def testCheckpointError(self):
      def train_fn(config):
          pass
  
      with self.assertRaises(ValueError):
          tune.run(
              train_fn,
              checkpoint_config=CheckpointConfig(
                  checkpoint_frequency=1
              ),
          )
      with self.assertRaises(ValueError):
          tune.run(
              train_fn,
              checkpoint_config=CheckpointConfig(
                  checkpoint_at_end=True
              ),
          )
  
imports: import json
  import os
  import sys
  import shutil
  import tempfile
  import unittest
  import ray
  from ray.air.constants import TRAINING_ITERATION
  from ray.rllib import _register_all
  import ray.train
  from ray import tune
  from ray.train import Checkpoint, CheckpointConfig
  from ray.tune.logger import NoopLogger
  from ray.tune.execution.placement_groups import PlacementGroupFactory
  from ray.tune.trainable import with_parameters, wrap_function
  from ray.tune.result import DEFAULT_METRIC
  from ray.tune.schedulers import ResourceChangingScheduler
  from ray.train.tests.util import mock_storage_context
label_desc: Use image node_id 3 for calling the FunctionApiTest obj's underlying member method code with example usage: obj.testCheckpointError() without return types