def median_grouped(name, num, minimum=0, maximum=0, ref=None):
    '''
    Calculates the grouped mean of the ``num`` most recent values. Requires a
    list.

    USAGE:

    .. code-block:: yaml

        foo:
          calc.median_grouped:
            - name: myregentry
            - num: 5
    '''
    return calc(
        name=name,
        num=num,
        oper='median_grouped',
        minimum=minimum,
        maximum=maximum,
        ref=ref
    )
Calculates the grouped mean of the ``num`` most recent values. Requires a
    list.

    USAGE:

    .. code-block:: yaml

        foo:
          calc.median_grouped:
            - name: myregentry
            - num: 5