'Apply the filter to the given value.
Args:
value: The comparable value to check.
Returns:
A boolean indicating if the given value matches the filter.'

def _apply_to_value(self, value):

    if self._start:
        result = cmp(self._get_start_key_value(), value)
        if ((result > 0) or ((result == 0) and (not self._start_incl))):
            return False
    if self._end:
        result = cmp(self._get_end_key_value(), value)
        if ((result < 0) or ((result == 0) and (not self._end_incl))):
            return False
    return True
