def METHOD_NAME(
    number_of_users: int,
    number_of_users_required: int,
    cum_number_of_users: int,
    number_of_tasks: int,
    number_of_results: int,
) -> int:
    """
    for each project the progress is calculated
    not all results are considered when calculating the progress
    if the required number of users has been reached for a task
    all further results will not contribute to increase the progress
    """
    if cum_number_of_users <= number_of_users_required:
        # this is the simplest case, the number of users is less than the required
        # number of users all results contribute to progress
        number_of_results_progress = number_of_results
    elif (cum_number_of_users - number_of_users) < number_of_users_required:
        # the number of users is bigger than the number of users required
        # but the previous number of users was below the required number
        # some results contribute to progress
        number_of_results_progress = (
            number_of_users_required - (cum_number_of_users - number_of_users)
        ) * number_of_tasks
    else:
        # for all other cases: already more users than required
        # all results do not contribute to progress
        number_of_results_progress = 0
    return number_of_results_progress