def METHOD_NAME(self, fig):
    ax = fig.add_subplot(xscale='auto-gps', epoch=150)
    ax.set_xlim(100, 200)
    ax.set_xlabel('test')
    segs = SegmentList([Segment(10, 110), Segment(150, 400)])
    segax = fig.add_segments_bar(segs)
    assert segax._sharex is ax
    assert ax.get_xlabel() == ''
    for ax_ in (ax, segax):
        assert ax_.get_xlim() == (100, 200)
        assert ax_.get_epoch() == 150.
    # check that it works again
    segax = fig.add_segments_bar(segs, ax=ax)
    # check errors
    with pytest.raises(ValueError):
        fig.add_segments_bar(segs, location='left')