I want to use OpenCV by branching the deepstream pipeline

I saw this and understood that I could change the last SINK to APPSINK.

But I don’t know how to implement it in the Python API.
PythonAPI uses Gst.Element.make() instead of a string, so it can’t be passed to VideoCapture in OpenCV.