def METHOD_NAME(self, events, peaks):
    area_per_channel = np.zeros(len(events), self.dtype["event_area_per_channel"])
    area_per_channel['time'] = events['time']
    area_per_channel['endtime'] = strax.endtime(events)
    n_channel = np.zeros(len(events), self.dtype["event_n_channel"])
    n_channel['time'] = events['time']
    n_channel['endtime'] = strax.endtime(events)
    split_peaks = strax.split_by_containment(peaks, events)
    for event_i, (event, sp) in enumerate(zip(events, split_peaks)):
        for type_ in ['s1', 's2', 'alt_s1', 'alt_s2']:
            type_index = event[f'{type_}_index']
            if type_index != -1:
                type_area_per_channel = sp['area_per_channel'][type_index]
                area_per_channel[f'{type_}_area_per_channel'][event_i] = type_area_per_channel
                area_per_channel[f'{type_}_length'][event_i] = sp['length'][type_index]
                area_per_channel[f'{type_}_dt'][event_i] = sp['dt'][type_index]
                if type_ == 's1':
                    area_per_channel['s1_n_channels'][event_i] = (
                        type_area_per_channel > 0).sum()
                    area_per_channel['s1_top_n_channels'][event_i] = (
                        type_area_per_channel[:self.config['n_top_pmts']] > 0).sum()
                    area_per_channel['s1_bottom_n_channels'][event_i] = (
                        type_area_per_channel[self.config['n_top_pmts']:] > 0).sum()
    for field in ['s1_n_channels', 's1_top_n_channels', 's1_bottom_n_channels']:
        n_channel[field] = area_per_channel[field]
    result = {
        "event_area_per_channel": area_per_channel,
        "event_n_channel": n_channel,
    }
    return result