Returns information about pending messages, in a range.
        name: name of the stream.
        groupname: name of the consumer group.
        min: minimum stream ID.
        max: maximum stream ID.
        count: number of messages to return
        consumername: name of a consumer to filter by (optional).

def xpending_range(self, name, groupname, min, max, count,
                       consumername=None):
        """
        Returns information about pending messages, in a range.
        name: name of the stream.
        groupname: name of the consumer group.
        min: minimum stream ID.
        max: maximum stream ID.
        count: number of messages to return
        consumername: name of a consumer to filter by (optional).
        """
        pieces = [name, groupname]
        if min is not None or max is not None or count is not None:
            if min is None or max is None or count is None:
                raise DataError("XPENDING must be provided with min, max "
                                "and count parameters, or none of them. ")
            if not isinstance(count, (int, long)) or count < -1:
                raise DataError("XPENDING count must be a integer >= -1")
            pieces.extend((min, max, str(count)))
        if consumername is not None:
            if min is None or max is None or count is None:
                raise DataError("if XPENDING is provided with consumername,"
                                " it must be provided with min, max and"
                                " count parameters")
            pieces.append(consumername)
        return self.execute_command('XPENDING', *pieces, parse_detail=True)