def _extract_spike_monitor(self, monitor):
        self.f_set(source=str(monitor.source))

        self.f_set(record=monitor.record)

        self.f_set(nspikes=monitor.nspikes)

        self.f_set(spiketimes_unit='second')

        self.f_set(delay=monitor.delay)

        if self._storage_mode == BrianMonitorResult.TABLE_MODE:
            spike_dict = {}

            if len(monitor.spikes) > 0:
                zip_lists = list(zip(*monitor.spikes))
                time_list = zip_lists[1]

                nounit_list = [np.float64(time) for time in time_list]

                spike_dict['spiketimes'] = nounit_list
                spike_dict['neuron'] = list(zip_lists[0])

                spiked_neurons = sorted(list(set(spike_dict['neuron'])))
                if spiked_neurons:
                    self.f_set(neurons_with_spikes=spiked_neurons)

                    spikeframe = pd.DataFrame(data=spike_dict)
                    self.f_set(spikes=spikeframe)

        elif self._storage_mode == BrianMonitorResult.ARRAY_MODE:
            format_string = self._get_format_string(monitor)
            self.f_set(format_string=format_string)

            spiked_neurons = set()

            for neuron, spikes in monitor.spiketimes.items():
                if len(spikes) > 0:

                    spiked_neurons.add(neuron)

                    key = 'spiketimes_' + neuron % format_string
                    self.f_set(**{key: spikes})

            spiked_neurons = sorted(list(spiked_neurons))
            if spiked_neurons:
                self.f_set(neurons_with_spikes=spiked_neurons)

        else:
            raise RuntimeError('You shall not pass!')
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/brian/parameter.py/BrianMonitorResult._extract_spike_monitor/swapped operands of `%`