def median(array):
    mysorted = [x for x in array]
    mysorted.sort()
    middle = int(len(mysorted) / 2)  # Gets the middle element, if present
    if len(mysorted) % 2 == 0:  # Even, so need to average together the middle two values
        return float((mysorted[middle] + mysorted[middle - 1])) / 2
    else:
        return mysorted[middle]
Tests that parse_metrics will properly ignore blank lines.
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/benchmarks.py/median--crossover with--dataset/ETHPy150Open kiip/statsite/tests/unit/test_collector.py/TestCollector.test_parse_metrics_ignores_blank_lines