def METHOD_NAME(median, l_min, l_max):
    for length in range(l_min, l_max + 1):
        for i, a in enumerate(
            itertools.permutations([x * 10 for x in range(length)])
        ):
            b = sorted(a)
            index = median(a)
            if length == 2 and index in (0, 1):
                print(
                    "OK median %d %d" % (length, i)
                )  # ok, median of 2 elements is not defined clearly
            elif a[index] != b[len(b) // 2]:
                print("FAIL median", a, b)
                return False
            else:
                print("OK median %d %d" % (length, i))
    return True