Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index d0a09d5..c99f6ba 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -193,8 +193,7 @@
     if ((op != Py_EQ && op != Py_NE) ||
         !PyWeakref_Check(self) ||
         !PyWeakref_Check(other)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
+        Py_RETURN_NOTIMPLEMENTED;
     }
     if (PyWeakref_GET_OBJECT(self) == Py_None
         || PyWeakref_GET_OBJECT(other) == Py_None) {