def omap(m):
    '''
    Create a nested mapping from origin to property to values/attributes covering an entire Versa model
    '''
    om = {}
    for s, p, o, a in m.match():
        om.setdefault(s, {})
        om[s].setdefault(p, []).append((o, a))
    return om
def omap ( m ) : om = { } for s , p , o , a in m . match ( ) : om . setdefault ( s , { } ) om [ s ] . setdefault ( p , [ ] ) . append ( ( o , a ) ) return om
Create a nested mapping from origin to property to values/attributes covering an entire Versa model