code: def test_config_serialization():
      c1 = ConfigTest(param=1, config=ConfigTest(param=2))
      expected_serialization = """!ConfigTest
  config: !ConfigTest
    config: null
    param: 2
  param: 1
  """
      with tempfile.TemporaryDirectory() as tmp_dir:
          fname = os.path.join(tmp_dir, "config")
          c1.save(fname)
          assert os.path.exists(fname)
          with open(fname) as f:
              assert f.read() == expected_serialization
  
          c2 = Config.load(fname)
          assert c2.param == c1.param
          assert c2.config.param == c1.config.param
  
file_path: sockeye/test/unit/test_config.py
imports: import tempfile
  from dataclasses import dataclass
  import os
  from typing import Any, Optional
  from sockeye.config import Config
label_desc: Use image node_id 3 for calling a global function with example usage: test_config_serialization() without return types