def calc_mid_bar(value1, value2, *args):
    """Calculate percentage of value out of the maximum
    of several values, for making a bar chart. Return
    the midpoint between the height of the first and second
    parameter."""

    top = max(args + (value1, value2))
    percent = (value1 + value2) / 2 / top * 100
    return percent