code: def _check_connection(fn):
      def wrapper(self, *args, **kwargs):
          if not self.server_connected:
              print("ERROR: No Visdom server currently connected")
              self._try_connect()
              return
          fn(self, *args, **kwargs)
  
      return wrapper
  
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 for calling a global function with example usage: _check_connection(fn) and returns: wrapper