code: def _write_info_file(out_dir: Path, **kwargs) -> None:
      """
      Create a yaml file info.yml in out_dir that contains kwargs.
      If the file already exists, it will be updated.
      """
      if (out_dir / "info.yml").exists():
          info = _read_info_file(out_dir)
          info.update(kwargs)
      else:
          info = kwargs
      with (out_dir / "info.yml").open("w") as f:
          yaml.dump(info, f, sort_keys=False)
  
imports: from comet_ml import Experiment
  from typing import Union, Type
  from pathlib import Path
  import yaml
  from tensorboardX import SummaryWriter
  import tempfile
  import editdistance
  import numpy
  from datetime import datetime
  from loguru import logger
  import sys
  from .None import utils
  from .None import image_classification
  from .model_wrapper import ModelWrapper
label_desc: Use image node_id 2 for calling a global function with example usage: _write_info_file(out_dir) without return types