code: def stopClient(self):
      try:
          if self.__connected:
              self.close()
          self.close_connection()
      except Exception as e:
          logger.warning("Failed to close connection: %s" % (e))
  
imports: import json
  import time
  import threading
  import six
  from ws4py.client import tornadoclient
  import tornado
  import pyalgotrade.logger
label_desc: Use image node_id 10 for calling the WebSocketClientBase obj's underlying member method code with example usage: obj.stopClient() without return types