class_docstr: Write all scalars to a tensorboard file.
code: def _writer(self):
      from torch.utils.tensorboard import SummaryWriter
  
      return SummaryWriter(**self._writer_args)
  
imports: import datetime
  import json
  import logging
  import os
  import time
  from collections import defaultdict
  from contextlib import contextmanager
  from functools import cached_property
  from typing import Optional
  import torch
  from fvcore.common.history_buffer import HistoryBuffer
  from detectron2.utils.file_io import PathManager
label_desc: Use image node_id 2 for calling the TensorboardXWriter obj's underlying member method code with example usage: obj._writer() and returns: SummaryWriter