def collect_fees(self, user, i_l, i_u):
    key = (user, i_l, i_u)
    position = self.positions[key]
    f_a = ((self.feeGrowth - self.ticks[i_u].feeGrowthOutside) if (self.i_a >= i_u) else self.ticks[i_u].feeGrowthOutside)
    f_b = (self.ticks[i_l].feeGrowthOutside if (self.i_a >= i_l) else (self.feeGrowth - self.ticks[i_l].feeGrowthOutside))
    feeGrowthInside = ((self.feeGrowth - f_a) - f_b)
    fees = ((feeGrowthInside - position.feeGrowthInsideLast) * position.L)
    position.feeGrowthInsideLast = feeGrowthInside
    return fees
def collect_fees(self, user, i_l, i_u):
    key = (user, i_l, i_u)
    position = self.positions[key]
    f_a = ((self.feeGrowth - self.ticks[i_u].feeGrowthOutside) if (self.i_a >= i_u) else self.ticks[i_u].feeGrowthOutside)
    f_b = (self.ticks[i_l].feeGrowthOutside if (self.i_a >= i_l) else (self.feeGrowth - self.ticks[i_l].feeGrowthOutside))
    feeGrowthInside = ((self.feeGrowth - f_a) - f_b)
    fees = ((feeGrowthInside - position.feeGrowthInsideLast) * position.L)
    position.feeGrowthInsideLast = feeGrowthInside
    return fees