def generate_checker(value):
    """Generate state checker for given value."""
    @property
    @wraps(can_be_)
    def checker(self):
        return self.can_be_(value)

    return checker
def generate_checker ( value ) : @ property @ wraps ( can_be_ ) def checker ( self ) : return self . can_be_ ( value ) return checker
Generate state checker for given value.