def set_final_prices(self, modes, request):
result = []<EOL>for mode in modes:<EOL><INDENT>if mode['<STR_LIT>']:<EOL><INDENT>mode['<STR_LIT>'] = EcommerceApiClient(request.user).get_course_final_price(<EOL>mode=mode,<EOL>enterprise_catalog_uuid=request.GET.get(<EOL>'<STR_LIT>'<EOL>) if request.method == '<STR_LIT:GET>' else None,<EOL>)<EOL><DEDENT>result.append(mode)<EOL><DEDENT>return result<EOL>
Set the final discounted price on each premium mode.