def get_event_data(self):
        try:
            eventdata = json.loads(self.datastring)["eventdata"]
        except __HOLE__, TypeError:
            # There was no data to return.
            print("No event data found in record:", self)
            return("")

        try:
            ret = []
            with io.BytesIO() as outstring:
                csvwriter = csv.writer(outstring)
                for event in eventdata:
                    csvwriter.writerow((self.uniqueid, event["eventtype"], event["interval"], event["value"], event["timestamp"]))
                ret = outstring.getvalue()
            return ret
        except:
            print("Error reading record:", self)
            return("")
dataset/ETHPy150Open NYUCCL/psiTurk/psiturk/models.py/Participant.get_event_data