code: def onMessage(self, msg):
      eventType = msg.get("event")
  
      if eventType == "pusher:error":
          self.onError(Event(msg, False))
      elif eventType == "pusher:ping":
          self.sendPong()
      elif eventType == "pusher:connection_established":
          self.onConnectionEstablished(Event(msg, True))
      elif eventType == "pusher_internal:subscription_succeeded":
          self.onSubscriptionSucceeded(Event(msg, True))
      else:
          # If we can't handle the message, notify the most concrete class.
          self.onUnknownEvent(Event(msg, False))
  
imports: import json
  from six.moves.urllib.parse import urlencode
  import pyalgotrade
  from pyalgotrade.websocket import client
  import pyalgotrade.logger
label_desc: Use image node_id 6 for calling the WebSocketClient obj's underlying member method code with example usage: obj.onMessage(msg) without return types