code: def test_write_read_info_file(tmp_path):
      _write_info_file(
          tmp_path, status="Running", config={"param1": 123}
      )
      assert (tmp_path / "info.yml").exists()
  
      # read the file and verify it matches
      content = _read_info_file(tmp_path)
      assert content["status"] == "Running"
      assert content["config"]["param1"] == 123
  
      # update and read again
      _write_info_file(tmp_path, status="Stopped", end_time=1)
      content = _read_info_file(tmp_path)
      assert content["status"] == "Stopped"
      assert content["config"]["param1"] == 123
      assert content["end_time"] == 1
  
file_path: traintool/tests/test_main.py
imports: import comet_ml
  import pytest
  from tensorboardX import SummaryWriter
  from conftest import create_dataset
  from traintool.main import connect_comet, train, load, _resolve_model, _write_info_file, _read_info_file, _create_comet_experiment, _create_tensorboard_writer
  from traintool.model_wrapper import ModelWrapper
  from traintool.utils import DummyExperiment
label_desc: Use image node_id 2 for calling a global function with example usage: test_write_read_info_file(tmp_path) without return types