code: def test_flat_to_nested():
      def test_pair(flt, nst):
          assert hyperparams.flat_to_nested(flt) == nst
          assert hyperparams.nested_to_flat(nst) == flt
  
      test_pair(
          {"a.b.c": 2, "a.c": 4, "c": 3},
          dict(a=dict(b=dict(c=2), c=4), c=3),
      )
  
      with pytest.raises(ValueError):
          hyperparams.flat_to_nested({"a.b.c": 2, "a.c": 4, "a": 3})
  
      with pytest.raises(ValueError):
          hyperparams.flat_to_nested({"a.b.c": 2, "a.b": 4, "c": 3})
  
      test_pair(
          {"a.b.c": 2, "a.c": [dict(a=4)], "c": (3, 2)},
          dict(a=dict(b=dict(c=2), c=[dict(a=4)]), c=(3, 2)),
      )
  
imports: from dataclasses import dataclass, field
  from typing import Optional, Dict, List, Tuple, Union
  import pytest
  from summarize_from_feedback.utils import hyperparams
label_desc: Use image node_id 8 for calling a global function with example usage: test_flat_to_nested() without return types