def trapezoid_midsegment(b1, b2):
    """
    definition: func(b1, b2) {...}
    objective : returns you the midsegment of a trapezoid on its two bases
                1/2 (base 1 + base 2)
    """
    midsegment = 1 / 2 * (b1 + b2)
    return midsegment
