def inclusive(data):
    """Return sample quartiles using Tukey's method.

        Q1 and Q3 are calculated as the medians of the two halves of the data,
        where the median Q2 is included in both halves. This is equivalent to
        Tukey's hinges H1, M, H2.
        """
    n = len(data)
    i = (n + 1) // 4
    m = n // 2
    if n % 4 in (0, 3):
        q1 = (data[i] + data[i - 1]) / 2
        q3 = (data[-i - 1] + data[-i]) / 2
    else:
        q1 = data[i]
        q3 = data[-i - 1]
    if n % 2 == 0:
        q2 = (data[m - 1] + data[m]) / 2
    else:
        q2 = data[m]
    return q1, q2, q3
