<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def compute_discounts(self, precision=None):
        '''
        Returns the total amount of discounts for this line with a specific
        number of decimals.
        @param precision:int number of decimal places
        @return: Decimal
        '''
        gross = self.compute_gross(precision)
        return min(gross,
                   sum([d.compute(gross, precision) for d in self.__discounts]))