Generate all unique statement origins in the given model

def all_origins(m):
    '''
    Generate all unique statement origins in the given model
    '''
    seen = set()
    for link in m.match():
        origin = link[ORIGIN]
        if origin not in seen:
            seen.add(origin)
            yield origin