def METHOD_NAME(self, home_is_temp):
    hdu = fits.CompImageHDU(np.arange(100).reshape((10, 10)).astype(np.int32))
    hdu.writeto(self.temp("image.fits"))
    with pytest.raises(OSError, match=_NOT_OVERWRITING_MSG_MATCH):
        hdu.writeto(self.temp("image.fits"), overwrite=False)
    hdu.writeto(self.temp("image.fits"), overwrite=True)