def METHOD_NAME(args,
                     Tstartup,
                     Tres_right_op,
                     Tres_right_cache,
                     Tmatch_group,
                     #Tassemble_row,
                     Tequal_fail,
                     Trow_left,
                     Trow_right
                     ):
    (
        Nrow_res,
        Nrow_left,
        Nrow_right,
        Nright_cache_in,
        Nright_cache_out,
        Nright_cache_clear,
        Nequal_cond
    ) = args
    total_cost = Tstartup
    total_cost += Nrow_left * Trow_left
    total_cost += (Nrow_right - Nright_cache_in) * Trow_right
    total_cost += Nright_cache_in * Tres_right_op
    total_cost += Nright_cache_out * Tres_right_cache
    #total_cost += Nrow_res * Tassemble_row
    total_cost += Nright_cache_clear * Tmatch_group
    total_cost += (Nequal_cond - Nrow_res - 2 * Tmatch_group) * Tequal_fail
    # total_cost += Nright_cache_in * Tres_right_op
    # total_cost += (Nrow_res - Nright_cache_in) * Tres_right_cache
    # total_cost += Nright_cache_clear * Tmatch_group
    # total_cost += Nrow_res * Tassemble_row
    # total_cost += (Nequal_cond - Nrow_res - 2 * Tmatch_group) * Tequal_fail
    # total_cost += Nrow_left * Trow_left
    # total_cost += (Nrow_right - Nright_cache_in) * Trow_right
    return total_cost