'Internal helper for comparison operators.
Args:
op: The operator (\'=\', \'<\' etc.).
Returns:
A FilterNode instance representing the requested comparison.'

def _comparison(self, op, value):

    if (not self._indexed):
        raise datastore_errors.BadFilterError(('Cannot    query    for    unindexed    property    %s' % self._name))
    from .query import FilterNode
    if (value is not None):
        value = self._do_validate(value)
        value = self._call_to_base_type(value)
        value = self._datastore_type(value)
    return FilterNode(self._name, op, value)
