code: def test_to_dict():
      config = Config(attr1=1, attr2=2)
      conf_dict = config.to_dict()
      assert len(conf_dict) == 2
      assert conf_dict["attr1"] == 1
      assert conf_dict["attr2"] == 2
  
file_path: jiant/tests/test_zconf/test_confs.py
imports: import pytest
  import jiant.utils.zconf
label_desc: Use image node_id 4 for calling a global function with example usage: test_to_dict() without return types