code: def visdom_connect(
      server: Optional[str] = None, port: Optional[int] = None
  ) -> None:
      """Connects to a visdom server if not currently connected."""
      if not visdom_connected():
          vis.append(visdom.Visdom(server=server, port=port))
  
file_path: ClassyVision/classy_vision/generic/visualize.py
imports: import math
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  import torch.nn.modules
  from classy_vision.generic.util import get_model_dummy_input, is_pos_int
  from classy_vision.models import ClassyModel
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: visdom_connect(server, port) without return types