def decrement_part_range(self, part, lb, ub):

        # Constraint in the range case is just enforcing both the
        # constraints from _small and _large cases.  Note the 0 as the
        # second argument to the _large call -- this is the signal to
        # decrement only as needed to for constraint enforcement.  The
        # short circuiting and left-to-right order of the 'and'
        # operator is important for this to work correctly.
        return self.decrement_part_small(part, ub) and \
            self.decrement_part_large(part, 0, lb)
Decrements part (a subrange of pstack), if possible, returning
dataset/ETHPy150Open sympy/sympy/sympy/utilities/enumerative.py/MultisetPartitionTraverser.decrement_part_range