import statistics


def median(wm):
    """
       Median Operator

       wm = list of importance weighted membership values

       returns the middle value in the set
    """
    return statistics.median(wm)