If you know the URI, do this:
# if you know what uri_x is
for s, p, o in g.triples((URIRef(uri_x), None, None)):
g.remove((s, p, o))
This will iterate through every triple with uri_x as its subject and remove it from the graph.
Of you don’t know the URI, e.g. for a Blank Node, find it then delete:
for s, p, o in g.triples((URIRef(some_object_uri), URIRef(some_property_uri), None)):
# o is now the Blank Node URI for the triple <some_object_uri> <some_property_uri> <o>
# loop through all triples with o as subject and remove them
for s2, p2, o2 in g.triples((o, None, None)):
g.remove((s2, p2, o2))
You could also use a SPARQL DELETE query put to the graph via:
g.update((your_delete_query))
Nick