def data_trigger(data, indices):
    """A generator that selects data from an iterator 
    at given unique 'trigger' indices
    
    Examples
    --------
    >>> data = range(10)
    >>> indices = [1,4,7]
    >>> [x for x in data_trigger(data, indices)]
    [1, 4, 7]
    
    """
    t = list(reversed(sorted(set(indices))))
    ii = t.pop()
    for i, d in enumerate(data):
        if i == ii:
            yield d
            try:
                ii = t.pop()
            except IndexError:
                break
