Refactor for RDFLib 4