code: def within_limits(self, value):
          
  
          if isinstance(value, int) or isinstance(value, float):
              value = value * self.default_unit
  
          return (self.limits[0] is None or value >= self.limits[0]) and (self.limits[1] is None or value <= self.limits[1])
docs: check whether a value falls within the set limits
  
          :parameter value: float or Quantity to test.  If value is a float, it is
              assumed that it has the same units as default_units