class_docstr: A generic service client.
  
  This will take an endpoint URL and a network_wrapper. You can use the
  RequestsNetworkWrapper if you want to use the requests module. The
  endpoint URL is prepended to all the requests and forwarded to the network
  wrapper.
class_docstr_tok: ["A","generic","service","client",".","This","will","take","an","endpoint","URL","and","a","network_wrapper",".","You","can","use","the","RequestsNetworkWrapper","if","you","want","to","use","the","requests","module",".","The","endpoint","URL","is","prepended","to","all","the","requests","and","forwarded","to","the","network","wrapper","."]
code: def __init__(self, endpoint, network_wrapper=None):
      if network_wrapper is None:
          network_wrapper = RequestsNetworkWrapper(
              session=requests.session()
          )
  
      self.network_wrapper = network_wrapper
  
      pattern = compile(".*(:[0-9]+)$")
      if not endpoint.endswith("/") and not pattern.match(endpoint):
          logger.warning(
              f"endpoint {endpoint} does not end with '/': appending."
          )
          endpoint = endpoint + "/"
  
      self.endpoint = endpoint
  
imports: import abc
  from collections.abc import MutableMapping
  import logging
  import requests
  from requests.auth import HTTPBasicAuth
  from re import compile
  import json
label_desc: Use image node_id 1 to create a new ServiceClient object  with example: obj = ServiceClient(endpoint, network_wrapper)