def parse_data(self):
        """
        Parse the data and generate Plato dialogue Experience logs.

        :return:
        """

        if not self.data_path:
            raise ValueError('Parse_MetalWOZ: No data_path provided')

        with open(self.data_path, "r") as data_file, \
                open('data/metalwoz.csv', 'w') as parsed_data_file:
            line = data_file.readline()
            csv_writer = csv.writer(parsed_data_file, delimiter=',')

            # Write header
            csv_writer.writerow(['user', 'system'])

            while line:
                dialogue = json.loads(line)

                if dialogue['turns']:
                    # Write first turn explicitly, since in the dialogues the
                    # system has the initiative.
                    csv_writer.writerow(['hi',
                                         dialogue['turns'][0]])

                for t in range(1, len(dialogue['turns']), 2):
                    if t+1 < len(dialogue['turns']):
                        csv_writer.writerow([dialogue['turns'][t],
                                             dialogue['turns'][t+1]])
                    else:
                        # Write last turn
                        csv_writer.writerow([dialogue['turns'][t],
                                             ''])

                line = data_file.readline()

        print('MetalWOZ parser Reading done.')

        Parse the data and generate Plato dialogue Experience logs.

        :return:
        
plato/utilities/parser/parse_metal_woz.py