code: def test_convert_from_and_to_dataclass():
      runtime_env = RuntimeEnv()
      test_plugin = TestPlugin(
          field1=[
              ValueType(nfield1=["a", "b", "c"], nfield2=False),
              ValueType(nfield1=["d", "e"], nfield2=True),
          ],
          field2="abc",
      )
      runtime_env.set("test_plugin", test_plugin)
      serialized_runtime_env = runtime_env.serialize()
      assert "test_plugin" in serialized_runtime_env
      runtime_env_2 = RuntimeEnv.deserialize(serialized_runtime_env)
      test_plugin_2 = runtime_env_2.get(
          "test_plugin", data_class=TestPlugin
      )
      assert len(test_plugin_2.field1) == 2
      assert test_plugin_2.field1[0].nfield1 == ["a", "b", "c"]
      assert test_plugin_2.field1[0].nfield2 is False
      assert test_plugin_2.field1[1].nfield1 == ["d", "e"]
      assert test_plugin_2.field1[1].nfield2 is True
      assert test_plugin_2.field2 == "abc"
  
file_path: ray/python/ray/tests/test_runtime_env_strong_type.py
imports: import os
  import sys
  import pytest
  import ray
  from typing import List
  from ray.runtime_env import RuntimeEnv
  from ray.runtime_env.types.pip import Pip
  from dataclasses import dataclass
label_desc: Use image node_id 1 for calling a global function with example usage: test_convert_from_and_to_dataclass() without return types