bpo-39573: Add Py_SET_TYPE() function (GH-18394)

Add Py_SET_TYPE() function to set the type of an object.
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst
index 100573c..8a1431c 100644
--- a/Doc/c-api/structures.rst
+++ b/Doc/c-api/structures.rst
@@ -70,6 +70,13 @@
       (((PyObject*)(o))->ob_type)
 
 
+.. c:function:: void Py_SET_TYPE(PyObject *o, PyTypeObject *type)
+
+   Set the object *o* type to *type*.
+
+   .. versionadded:: 3.9
+
+
 .. c:macro:: Py_REFCNT(o)
 
    This macro is used to access the :attr:`ob_refcnt` member of a Python