def median_of_4(num1, num2, num3, num4):
    """Utility functions to compute the median of 4 numbers"""
    num_sum = num1 + num2 + num3 + num4
    num_sum -= min(num1, num2, num3, num4)
    num_sum -= max(num1, num2, num3, num4)
    return num_sum / 2.0