def METHOD_NAME(self, start_frame, end_frame, channel_indices):
    traces = self.parent_recording_segment.METHOD_NAME(start_frame, end_frame, channel_indices)
    traces = traces.copy()
    num_channels = traces.shape[1]
    if start_frame is None:
        start_frame = 0
    if end_frame is None:
        end_frame = self.get_num_samples()
    if len(self.periods) > 0:
        new_interval = np.array([start_frame, end_frame])
        lower_index = np.searchsorted(self.periods[:, 1], new_interval[0])
        upper_index = np.searchsorted(self.periods[:, 0], new_interval[1])
        if upper_index > lower_index:
            periods_in_interval = self.periods[lower_index:upper_index]
            for period in periods_in_interval:
                onset = max(0, period[0] - start_frame)
                offset = min(period[1] - start_frame, end_frame)
                if self.mode == "zeros":
                    traces[onset:offset, :] = 0
                elif self.mode == "noise":
                    traces[onset:offset, :] = self.noise_levels[channel_indices] * np.random.randn(
                        offset - onset, num_channels
                    )
    return traces