code: def test_node_launch_exception_serialization(shutdown_only):
      ray.init(num_cpus=1)
  
      exc_info = None
      try:
          raise Exception("Test exception.")
      except Exception:
          exc_info = sys.exc_info()
      assert exc_info is not None
  
      exc = NodeLaunchException("cat", "desc", exc_info)
  
      after_serialization = ray.get(ray.put(exc))
  
      assert after_serialization.category == exc.category
      assert after_serialization.description == exc.description
      assert after_serialization.src_exc_info is None
  
file_path: ray/python/ray/tests/test_autoscaler_e2e.py
imports: import subprocess
  from ray.autoscaler._private.constants import AUTOSCALER_METRIC_PORT
  import pytest
  import ray
  import sys
  from ray._private.test_utils import reset_autoscaler_v2_enabled_cache, wait_for_condition, get_metric_check_condition, MetricSamplePattern
  from ray.cluster_utils import AutoscalingCluster
  from ray.autoscaler.node_launch_exception import NodeLaunchException
label_desc: Use image node_id 4 for calling a global function with example usage: test_node_launch_exception_serialization(shutdown_only) without return types