code: def test_write_new_config(self):
      cs = CS.ConfigurationSpace()
      cs.add_hyperparameter(CS.CategoricalHyperparameter("test", [1]))
  
      with tempfile.TemporaryDirectory() as temp_dir:
          logger = json_result_logger(temp_dir)
  
          logger.new_config(
              "1",
              cs.sample_configuration().get_dictionary(),
              {"test": "test"},
          )
  
          self.assertTrue(os.path.exists(temp_dir))
          self.assertTrue(
              os.path.exists(os.path.join(temp_dir, "configs.json"))
          )
          self.assertTrue(
              os.path.exists(os.path.join(temp_dir, "results.json"))
          )
          self.assertEqual(logger.config_ids, set("1"))
  
          with open(os.path.join(temp_dir, "configs.json")) as fh:
              data = fh.read()
              data = data.rstrip()
              self.assertEqual(
                  data, r'["1", {"test": 1}, {"test": "test"}]'
              )
  
file_path: HpBandSter/tests/test_result.py
imports: import unittest
  from hpbandster.core.result import Run, extract_HBS_learning_curves, json_result_logger, logged_results_to_HBS_result
  from hpbandster.core.base_iteration import Datum
  import ConfigSpace
  import tempfile
  import sys
  import os.path
label_desc: Use image node_id 1 for calling the TestJsonResultLogger obj's underlying member method code with example usage: obj.test_write_new_config() without return types