Prepare a triple for rdflib

def prep(s, p, o):
    '''
    Prepare a triple for rdflib
    '''
    def bnode_check(r):
        return isinstance(r, mock_bnode) or r.startswith('VERSABLANKNODE_')

    s = BNode() if bnode_check(s) else URIRef(s)
    p = URIRef(p)
    o = BNode() if bnode_check(o) else (URIRef(o) if isinstance(o, I) else Literal(o))
    return s, p, o