def METHOD_NAME(self, peaks):
    result = np.ones(len(peaks), dtype=self.dtype)
    result['time'], result['endtime'] = peaks['time'], strax.endtime(peaks)
    result['x'] *= float('nan')
    result['y'] *= float('nan')
    # Keep large peaks only
    peak_mask = peaks['area'] > self.config['min_reconstruction_area']
    if not np.sum(peak_mask):
        # Nothing to do, and .predict crashes on empty arrays
        return result
    # Input: normalized hitpatterns in good top PMTs
    _in = peaks['area_per_channel'][peak_mask, :]
    _in = _in[:, :self.config['n_top_pmts']][:, self.pmt_mask]
    with np.errstate(divide='ignore', invalid='ignore'):
        _in /= _in.sum(axis=1).reshape(-1, 1)
    # Output: positions in mm (unfortunately), so convert to cm
    _out = self.nn.predict(_in) / 10
    # Set output in valid rows. Do NOT try result[peak_mask]['x']
    # unless you want all NaN positions (boolean masks make a copy unless
    # they are used as the last index)
    result['x'][peak_mask] = _out[:, 0]
    result['y'][peak_mask] = _out[:, 1]
    return result