code: def test_from_checkpoint():
      with create_dict_checkpoint(
          {"factor": 2.0}, checkpoint_cls=FrameworkCheckpoint
      ) as checkpoint:
          assert (
              DummyPredictor.from_checkpoint(checkpoint).factor == 2.0
          )
  
imports: import uuid
  from typing import Dict, Optional, Union
  from unittest import mock
  import numpy
  import pandas
  import pytest
  import ray
  from ray.air.constants import TENSOR_COLUMN_NAME
  from ray.air.util.data_batch_conversion import BatchFormat
  from ray.data import Preprocessor
  from ray.train._internal.framework_checkpoint import FrameworkCheckpoint
  from ray.train.predictor import Predictor, PredictorNotSerializableException
  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: test_from_checkpoint() without return types