def update_audits(self, event, data):
        """Sends audit data to the OSC client."""

        # This method just sends all audits to the client whenever any OSC
        # message comes in that starts with /audits

        if not hasattr(self.machine, 'auditor'):
            return

        for category in self.machine.auditor.current_audits:
            for entry in self.machine.auditor.current_audits[category]:
                if category != 'Player':
                    self.client_send_osc_message(category="audits",
                        name=category + '/' + entry,
                        data=self.machine.auditor.current_audits[category][entry])

        if 'Player' in self.machine.auditor.current_audits:
            for entry in self.machine.auditor.current_audits['Player']:
                self.client_send_osc_message(category="audits",
                    name='Player/' + entry + '/average',
                    data=self.machine.auditor.current_audits['Player'][entry]
                        ['average'])
                self.client_send_osc_message(category="audits",
                    name='Player/' + entry + '/total',
                    data=self.machine.auditor.current_audits['Player'][entry]
                        ['total'])
                i = 0
                for top in (self.machine.auditor.current_audits['Player']
                            [entry]['top']):
                    self.client_send_osc_message(category="audits",
                        name='Player/' + entry + '/top/' + str(i+1),
                        data=self.machine.auditor.current_audits[
                            'Player'][entry]['top'][i])
                    i += 1
dataset/ETHPy150Open missionpinball/mpf/mpf/plugins/osc.py/OSC.update_audits/original