code: def test_nested_params():
      b = B(a=A(value=42), b=99)
  
      assert equals(b, serde.flat.decode(serde.flat.encode(b)))
  
      b2 = serde.flat.clone(b, {"a.value": 999})
      assert b2.a.value == 999
  
file_path: gluonts/test/core/test_serde_flat.py
imports: from gluonts.core import serde
  from gluonts.core.component import equals
  from gluonts.pydantic import BaseModel
label_desc: Use image node_id 1 for calling a global function with example usage: test_nested_params() without return types