docstr: A WMS monitor is a workflow management system logger to enable
  monitoring with something like Panoptes. The address corresponds to
  the --wms-monitor argument, and args should be a list of key/value
  pairs with extra arguments to send to identify the workflow. We require
  the logging server to exist and receive creating a workflow to start
  the run, but we don't exit with error if any updates fail, as the
  workflow will already be running and it would not be worth stopping it.
code: def __init__(self, address=None, args=None, metadata=None):
      """A WMS monitor is a workflow management system logger to enable
      monitoring with something like Panoptes. The address corresponds to
      the --wms-monitor argument, and args should be a list of key/value
      pairs with extra arguments to send to identify the workflow. We require
      the logging server to exist and receive creating a workflow to start
      the run, but we don't exit with error if any updates fail, as the
      workflow will already be running and it would not be worth stopping it.
      """
  
      from snakemake.resources import DefaultResources
  
      self.address = address or "http:127.0.0.1:5000"
      self.args = (
          list(map(DefaultResources.decode_arg, args)) if args else []
      )
      self.args = {item[0]: item[1] for item in list(self.args)}
  
      self.metadata = metadata or {}
  
      # A token is suggested but not required, depends on server
      self.token = os.getenv("WMS_MONITOR_TOKEN")
      self.service_info()
  
      # Create or retrieve the existing workflow
      self.create_workflow()
  
imports: import logging
  import platform
  import time
  import datetime
  import sys
  import os
  import json
  import threading
  from functools import partial
  import inspect
  import textwrap
label_desc: Use image node_id 1 to create a new WMSLogger object  with example: obj = WMSLogger(address, args, metadata)