def prep(link):
    '''
    Prepare a statement into a triple ready for rdflib
    '''
    s, p, o = link[:3]
    s = URIRef(s)
    p = URIRef(p)
    o = URIRef(o) if isinstance(o, I) else Literal(o)
    return s, p, o