code: def __init__(self, eventDict, dataIsJSON):
      self.__eventDict = eventDict
      self.__data = eventDict.get("data")
      if self.__data is not None and dataIsJSON:
          self.__data = json.loads(self.__data)
  
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 1 to create a new Event object from inherited base classes: object with example: obj = Event(eventDict, dataIsJSON)