def METHOD_NAME(self):
    for which, methods in [
        ("xy", ["get_shared_x_axes", "get_shared_y_axes"]),
        ("x", ["get_shared_x_axes"]),
        ("y", ["get_shared_y_axes"]),
        ("both", ["get_shared_x_axes", "get_shared_y_axes"]),
    ]:
        with self.subTest(which=which, methods=methods):
            fig, ax = plt.subplots(5)
            share_axes(ax, which=which)
            for a in ax:
                for m in methods:
                    self.assertTrue(
                        all([i in getattr(a, m)().get_siblings(a) for i in ax])
                    )
            plt.close("all")