@cleanup
def test_remove_from_figure_with_gridspec():
 _test_remove_from_figure(True)

@ cleanup def test_remove_from_figure_with_gridspec ( ) : _test_remove_from_figure ( True )
make sure that remove_from_figure removes the colorbar and properly restores the gridspec .