How to detect if a twin axis has been generated for a matplotlib axis
<p>How can one detect if an axis has a twin axis written on top of it? For example, if given <code>ax</code> below, how can I discover that <code>ax2</code> exists?</p>

<pre><code>import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.plot([1, 2, 3])
ax2 = ax.twinx()
</code></pre>