# import math
#
# ACCESS_TYPE_OWNED = 'owned'
# ACCESS_TYPE_PUBLIC = 'public'
# ACCESS_TYPE_SUBSCRIBED = 'subscribed'
# ALLOWED_ACCESS_TYPES = [ACCESS_TYPE_OWNED,
#                         ACCESS_TYPE_PUBLIC, ACCESS_TYPE_SUBSCRIBED]
#
#
# def price_calculator_helper(user, exam):
#     user_min_wage_fee = user.best_min_wage_fee
#     user_wage_factor = user.best_wage_factor
#     user_tax_factor = user.best_tax_factor
#
#     wage = exam.price * user_wage_factor
#     if wage < user_min_wage_fee:
#         wage = user_min_wage_fee
#
#     tax = (exam.price + wage) * user_tax_factor
#
#     total_cost = math.floor(exam.price + wage + tax)  # all these numbers should be integers
#     institute_share = math.ceil(exam.price)  # all these numbers should be integers
#     wikiazma_share = total_cost - institute_share  # all these numbers should be integers
#
#     return total_cost, institute_share, wikiazma_share, wage, tax