def METHOD_NAME(
    self, input_low: GeneralizedTensor, input_range: GeneralizedTensor, levels: int
) -> Tuple[GeneralizedTensor, GeneralizedTensor]:
    input_high = input_range + input_low
    input_low[input_low > 0] = 0
    input_high[input_high < 0] = 0
    n = levels - 1
    scale = levels / (input_high - input_low)
    scale = self._astype(scale, input_high.dtype)
    zp = self.backend.round(-input_low * scale)
    new_input_low = self.backend.where(zp < n, zp / (zp - n) * input_high, input_low)
    new_input_high = self.backend.where(zp > 0.0, (zp - n) / zp * input_low, input_high)
    range_1 = input_high - new_input_low
    range_2 = new_input_high - input_low
    mask = self._astype((range_1 > range_2), input_high.dtype)
    inv_mask = abs(1 - mask)
    new_input_low = mask * new_input_low + inv_mask * input_low
    new_input_range = inv_mask * new_input_high + mask * input_high - new_input_low
    return new_input_low, new_input_range