docstr: A helper function to take a response and check for an expected set of
  error codes, 404 (not found), 401 (requires authorization), 403 (permission
  denied), 500 (server error) and 200 (success).
code: def check_response(self, response, endpoint="wms monitor request"):
      """A helper function to take a response and check for an expected set of
      error codes, 404 (not found), 401 (requires authorization), 403 (permission
      denied), 500 (server error) and 200 (success).
      """
      status_code = response.status_code
      # Cut out early on success
      if status_code == 200:
          return
  
      if status_code == 404:
          sys.stderr.write(f"The wms {endpoint} endpoint was not found")
          sys.exit(-1)
      elif status_code == 401:
          sys.stderr.write(
              "Authorization is required with a WMS_MONITOR_TOKEN in the environment"
          )
          sys.exit(-1)
      elif status_code == 500:
          sys.stderr.write(
              f"There was a server error when trying to access {endpoint}"
          )
          sys.exit(-1)
      elif status_code == 403:
          sys.stderr.write("Permission is denied to %s." % endpoint)
          sys.exit(-1)
  
      # Any other response code is not acceptable
      sys.stderr.write(
          f"The {endpoint} response code {response.status_code} is not recognized."
      )
  
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 4 for calling the WMSLogger obj's underlying member method code with example usage: obj.check_response(response, endpoint) without return types