Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 8743408..156ad18 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -832,8 +832,7 @@
 
     if (!PyObject_TypeCheck(v, &deque_type) ||
         !PyObject_TypeCheck(w, &deque_type)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
+        Py_RETURN_NOTIMPLEMENTED;
     }
 
     /* Shortcuts */
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 747be45..718dfe2 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -1812,8 +1812,7 @@
         return diff_to_bool(diff, op);
     }
     else {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
+        Py_RETURN_NOTIMPLEMENTED;
     }
 }
 
@@ -1911,10 +1910,8 @@
     PyObject *pyus_remainder;
     PyObject *remainder;
 
-    if (!PyDelta_Check(left) || !PyDelta_Check(right)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (!PyDelta_Check(left) || !PyDelta_Check(right))
+        Py_RETURN_NOTIMPLEMENTED;
 
     pyus_left = delta_to_microseconds((PyDateTime_Delta *)left);
     if (pyus_left == NULL)
@@ -1949,10 +1946,8 @@
     PyObject *delta;
     PyObject *result;
 
-    if (!PyDelta_Check(left) || !PyDelta_Check(right)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (!PyDelta_Check(left) || !PyDelta_Check(right))
+        Py_RETURN_NOTIMPLEMENTED;
 
     pyus_left = delta_to_microseconds((PyDateTime_Delta *)left);
     if (pyus_left == NULL)
@@ -2546,10 +2541,9 @@
 static PyObject *
 date_add(PyObject *left, PyObject *right)
 {
-    if (PyDateTime_Check(left) || PyDateTime_Check(right)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (PyDateTime_Check(left) || PyDateTime_Check(right))
+        Py_RETURN_NOTIMPLEMENTED;
+
     if (PyDate_Check(left)) {
         /* date + ??? */
         if (PyDelta_Check(right))
@@ -2568,17 +2562,15 @@
                                       (PyDateTime_Delta *) left,
                                       0);
     }
-    Py_INCREF(Py_NotImplemented);
-    return Py_NotImplemented;
+    Py_RETURN_NOTIMPLEMENTED;
 }
 
 static PyObject *
 date_subtract(PyObject *left, PyObject *right)
 {
-    if (PyDateTime_Check(left) || PyDateTime_Check(right)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (PyDateTime_Check(left) || PyDateTime_Check(right))
+        Py_RETURN_NOTIMPLEMENTED;
+
     if (PyDate_Check(left)) {
         if (PyDate_Check(right)) {
             /* date - date */
@@ -2597,8 +2589,7 @@
                                       1);
         }
     }
-    Py_INCREF(Py_NotImplemented);
-    return Py_NotImplemented;
+    Py_RETURN_NOTIMPLEMENTED;
 }
 
 
@@ -2715,10 +2706,8 @@
                           _PyDateTime_DATE_DATASIZE);
         return diff_to_bool(diff, op);
     }
-    else {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    else
+        Py_RETURN_NOTIMPLEMENTED;
 }
 
 static PyObject *
@@ -3215,10 +3204,8 @@
 timezone_richcompare(PyDateTime_TimeZone *self,
                      PyDateTime_TimeZone *other, int op)
 {
-    if (op != Py_EQ && op != Py_NE) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (op != Py_EQ && op != Py_NE)
+        Py_RETURN_NOTIMPLEMENTED;
     return delta_richcompare(self->offset, other->offset, op);
 }
 
@@ -3664,10 +3651,8 @@
     PyObject *offset1, *offset2;
     int diff;
 
-    if (! PyTime_Check(other)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (! PyTime_Check(other))
+        Py_RETURN_NOTIMPLEMENTED;
 
     if (GET_TIME_TZINFO(self) == GET_TIME_TZINFO(other)) {
         diff = memcmp(((PyDateTime_Time *)self)->data,
@@ -4356,8 +4341,7 @@
                                       (PyDateTime_Delta *) left,
                                       1);
     }
-    Py_INCREF(Py_NotImplemented);
-    return Py_NotImplemented;
+    Py_RETURN_NOTIMPLEMENTED;
 }
 
 static PyObject *
@@ -4559,8 +4543,7 @@
                 Py_RETURN_TRUE;
             return cmperror(self, other);
         }
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
+        Py_RETURN_NOTIMPLEMENTED;
     }
 
     if (GET_DT_TZINFO(self) == GET_DT_TZINFO(other)) {
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index 3d44094..b50658c 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -173,10 +173,9 @@
 
 static PyObject* pysqlite_row_richcompare(pysqlite_Row *self, PyObject *_other, int opid)
 {
-    if (opid != Py_EQ && opid != Py_NE) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (opid != Py_EQ && opid != Py_NE)
+        Py_RETURN_NOTIMPLEMENTED;
+
     if (PyType_IsSubtype(Py_TYPE(_other), &pysqlite_RowType)) {
         pysqlite_Row *other = (pysqlite_Row *)_other;
         PyObject *res = PyObject_RichCompare(self->description, other->description, opid);
@@ -186,8 +185,7 @@
             return PyObject_RichCompare(self->data, other->data, opid);
         }
     }
-    Py_INCREF(Py_NotImplemented);
-    return Py_NotImplemented;
+    Py_RETURN_NOTIMPLEMENTED;
 }
 
 PyMappingMethods pysqlite_row_as_mapping = {
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index ae68c15..81c9c36 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -514,10 +514,8 @@
     Py_ssize_t i, k;
     PyObject *res;
 
-    if (!array_Check(v) || !array_Check(w)) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if (!array_Check(v) || !array_Check(w))
+        Py_RETURN_NOTIMPLEMENTED;
 
     va = (arrayobject *)v;
     wa = (arrayobject *)w;
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 2be5ec9..d701690 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4925,10 +4925,9 @@
 {
     int eq;
 
-    if ((op != Py_EQ && op != Py_NE) || Py_TYPE(other) != &cpu_set_type) {
-        Py_INCREF(Py_NotImplemented);
-        return Py_NotImplemented;
-    }
+    if ((op != Py_EQ && op != Py_NE) || Py_TYPE(other) != &cpu_set_type)
+        Py_RETURN_NOTIMPLEMENTED;
+
     eq = set->ncpus == other->ncpus && CPU_EQUAL_S(set->size, set->set, other->set);
     if ((op == Py_EQ) ? eq : !eq)
         Py_RETURN_TRUE;
@@ -4949,8 +4948,7 @@
         } \
         if (Py_TYPE(right) != &cpu_set_type || left->ncpus != right->ncpus) { \
             Py_DECREF(res); \
-            Py_INCREF(Py_NotImplemented); \
-            return Py_NotImplemented; \
+            Py_RETURN_NOTIMPLEMENTED; \
         } \
         assert(left->size == right->size && right->size == res->size); \
         op(res->size, res->set, left->set, right->set); \
diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c
index ec924f2..661b6e2 100644
--- a/Modules/xxlimited.c
+++ b/Modules/xxlimited.c
@@ -187,8 +187,7 @@
 static PyObject *
 null_richcompare(PyObject *self, PyObject *other, int op)
 {
-    Py_INCREF(Py_NotImplemented);
-    return Py_NotImplemented;
+    Py_RETURN_NOTIMPLEMENTED;
 }
 
 static PyType_Slot Null_Type_slots[] = {