code: def __init__(self, *args, **kwargs):
      try:
          from visdom import Visdom
      except ImportError:
          raise ImportError(
              "Visdom visualization requires installation of Visdom"
          )
  
      self.scalar_dict = {}
      self.server_connected = False
      self.vis = Visdom(*args, **kwargs)
      self.windows = {}
  
      self._try_connect()
  
imports: import gc
  import numpy
  import math
  import json
  import time
  from .summary import compute_curve
  from .utils import figure_to_image
  from .x2num import make_np
label_desc: Use image node_id 1 to create a new VisdomWriter object  with example: obj = VisdomWriter()