Creates a subclass with value range constraint.

def withRange(cls, minimum, maximum):
        """Creates a subclass with value range constraint.
        """

        class X(cls):
            subtypeSpec = cls.subtypeSpec + constraint.ValueRangeConstraint(
                minimum, maximum)

        X.__name__ = cls.__name__
        return X