def METHOD_NAME():
    aiapair = sunpy.io.read_file(TEST_AIA_IMAGE)[0]
    with open("aia_171_image_bytes.fits", 'wb') as fileo:
        sunpy.io.write_file(fileo, aiapair[0], aiapair[1], filetype='fits')
    assert os.path.exists("aia_171_image_bytes.fits")
    outpair = sunpy.io.read_file(TEST_AIA_IMAGE)[0]
    assert np.all(np.equal(outpair[0], aiapair[0]))
    assert outpair[1] == aiapair[1]
    os.remove("aia_171_image_bytes.fits")