def get_trial_data(self):
        try:
            trialdata = json.loads(self.datastring)["data"]
        except __HOLE__, ValueError:
            # There was no data to return.
            print("No trial data found in record:", self)
            return("")

        try:
            ret = []
            with io.BytesIO() as outstring:
                csvwriter = csv.writer(outstring)
                for trial in trialdata:
                    csvwriter.writerow((
                        self.uniqueid,
                        trial["current_trial"],
                        trial["dateTime"],
                        json.dumps(trial["trialdata"])))
                ret = outstring.getvalue()
            return ret
        except:
            print("Error reading record:", self)
            return("")
dataset/ETHPy150Open NYUCCL/psiTurk/psiturk/models.py/Participant.get_trial_data