def calculate_compounded_added_taxes(price, tax_groups):
 if price.includes_tax:
  return _calc_compounded_added_taxes_from_taxful(price, tax_groups)
 else:
  return _calc_compounded_added_taxes_from_taxless(price, tax_groups)

def calculate_compounded_added_taxes ( price , tax_groups ) : if price . includes_tax : return _calc_compounded_added_taxes_from_taxful ( price , tax_groups ) else : return _calc_compounded_added_taxes_from_taxless ( price , tax_groups )
calculate compounded and added taxes from given groups of taxes .