code: def test_set_state_dict():
      """Test that set_state_dict sets state properly to generate new cmdline."""
      cmdline_parser = CmdlineParser()
  
      cmdline_parser.set_state_dict(
          {
              "arguments": {},
              "template": [
                  "{_pos_0}",
                  "{_pos_1}",
                  "--with",
                  "{with}",
                  "--plus",
                  "--booleans",
              ],
          }
      )
  
      assert cmdline_parser.format(
          {"_pos_0": "voici", "_pos_1": "voila", "with": "class"}
      ) == ["voici", "voila", "--with", "class", "--plus", "--booleans"]
  
file_path: orion/tests/unittests/core/io/test_cmdline_parser.py
imports: import os
  from collections import OrderedDict
  import pytest
  from orion.core.io.cmdline_parser import CmdlineParser
label_desc: Use image node_id 12 for calling a global function with example usage: test_set_state_dict() without return types