def trial_mean_fr(self, cluster: int) -> float:
    if (self.duration is None):
        raise IndexError('No duration provided, give me one!')
    return (self.n_spikes(cluster) / self.duration)
def trial_mean_fr(self, cluster: int) -> float:
    if (self.duration is None):
        raise IndexError('No duration provided, give me one!')
    return (self.n_spikes(cluster) / self.duration)