code: def test_serialization():
      """Tests that Predictor instances are not serializable."""
  
      # Class is serializable.
      ray.put(DummyPredictor)
  
      # Instance is not serializable.
      predictor = DummyPredictor()
      with pytest.raises(PredictorNotSerializableException):
          ray.put(predictor)
  
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 1 for calling a global function with example usage: test_serialization() without return types