def __call__(self, value, property=None, client=None):
		result = self.function( value )
		if self.required is self.TRUE_VALUES:
			if not result:
				raise BoundaryValueError(
					property, self, client, value,
					"%s(%s) gave false value, required a true value"%(
						getattr(self.function, '__name__', self.function), 
						repr(value)[:50],
					)
				)
		elif self.required is self.FALSE_VALUES:
			if result:
				raise BoundaryValueError(
					property, self, client, value,
					"%s(%s) gave true value, required a false value"%(
						getattr(self.function, '__name__', self.function), 
						repr(value)[:50],
					)
				)
		elif self.required != result:
			raise BoundaryValueError(
				property, self, client, value,
				"%s(%s) gave value different from required value %r"%(
					getattr(self.function, '__name__', self.function), 
					repr(value)[:50],
					self.required,
				)
			)
Check value against boundary conditions
dataset/ETHPy150Open correl/Transmission-XBMC/resources/lib/basictypes/boundary.py/Function.__call__