def log(self, output, event):
        # update stats
        if '_event' in event or '_bits' in event:
            stat = self._event_stats.get(event['_event'], [0, 0])
            stat[0] += 1  # count of events
            stat[1] += event['_bits']  # count of bits
            self._event_stats[event['_event']] = stat
        # write structure
        if args.json:
            s = json.dumps(event, encoding="ISO-8859-1");
            print(s);
        else:
            pprint.pprint(event, stream=output)
dataset/ETHPy150Open Blizzard/heroprotocol/heroprotocol.py/EventLogger.log/operator `and` -> `or`