def METHOD_NAME(dask_array_in_mem, tmp_path):
    # Saving an image HDU directly
    filename = tmp_path / "test.fits"
    hdu = ImageHDU(data=dask_array_in_mem)
    hdu.writeto(filename)
    with fits.open(filename) as hdulist_new:
        assert isinstance(hdulist_new[1].data, np.ndarray)
        np.testing.assert_allclose(hdulist_new[1].data, dask_array_in_mem.compute())