I'm very new to Tex, and recently realized that I will be needing to use TikZCD a fair amount. I began to draw many diagrams and realized that it would be very convenient if there was a quick way of dualizing a diagram (perhaps this means rotating everything by π and then flipping all the arrows). As a simple example
\begin{tikzcd}
T
\arrow[drr, bend left,]
\arrow[ddr, bend right,]
\arrow[dr, dashed] & & \\
& R/IJ \arrow[r] \arrow[d]
& R/I \arrow[d, "f"] \\
& R/J \arrow[r, "g"]
& R/(I+J)
\end{tikzcd}
is an example of a pullback diagram, its dual being a pushout diagram:
\begin{tikzcd}
Z \ar[d,"f",swap] \ar[r,"g"] & Y \ar[d,"g'"] \ar[ddr,bend left,swap,"k"]\\
X \ar[r,"f'",swap] \ar[drr,bend right,"j"] & W \ar[dr,dashed]\\
& & V
\end{tikzcd}
What I would like is a script that could take the first diagram and return something like the second. It would be great if anyone knew of a script or something that was capable of doing such a thing. Thanks!