code: def _create_tensorboard_writer(
      out_dir: Path, write_to_disk: bool = True
  ):
      """Returns a writer for tensorboard that logs to out_dir"""
      return SummaryWriter(
          logdir=(out_dir / "tb").resolve(), write_to_disk=write_to_disk
      )
  
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 5 for calling a global function with example usage: _create_tensorboard_writer(out_dir, write_to_disk) and returns: SummaryWriter