Finally, fixed it. After a lot of digging, I discovered that the RDFNamespace class (PyShEx was importing it) is not available in rdflib~=6.0, I mean it was removed from the later releases. So, ultimately downgrading rdflib to ~=5.0" fixed the issue in the example notebooks. I applied the changes to the RWTH GitLab project. Please check and apply similar changes here too.
Finally, fixed it. After a lot of digging, I discovered that the RDFNamespace class (PyShEx was importing it) is not available in rdflib~=6.0, I mean it was removed from the later releases. So, ultimately downgrading rdflib to ~=5.0" fixed the issue in the example notebooks. I applied the changes to the RWTH GitLab project. Please check and apply similar changes here too.