def METHOD_NAME(
    self,
    threshold: typing.Union[int, float],
    rate: typing.Union[int, float],
) -> None:
    if threshold in self.thresholds:
        i = self.thresholds.index(threshold)
        self.rates[i] += rate
    else:
        i = bisect.bisect_left(self.thresholds, threshold)
        self.thresholds.insert(i, threshold)
        self.rates.insert(i, rate)