human
I wrote the below code

    data_file = get_pkg_data_filename(u'data/sip-wcs.fits')
    def check_wcs_ctypes(header):
        expected_wcs_ctypes = {u'CTYPE1': u'RA---TAN-SIP', u'CTYPE2': u'DEC--TAN-SIP'}
        return [(header[k] == v) for (k, v) in expected_wcs_ctypes.items()]
    ccd_original = CCDData.read(data_file)
    with fits.open(data_file) as raw:
        good_ctype = check_wcs_ctypes(raw[0].header)
    assert all(good_ctype)
    ccd_new = ccd_original.to_hdu()
    good_ctype = check_wcs_ctypes(ccd_new[0].header)
    assert all(good_ctype)
    ccd_no_relax = ccd_original.to_hdu(wcs_relax=False)
    good_ctype = check_wcs_ctypes(ccd_no_relax[0].header)
    assert (not any(good_ctype))
    assert (ccd_no_relax[0].header[u'CTYPE1'] == u'RA---TAN')
    assert (ccd_no_relax[0].header[u'CTYPE2'] == u'DEC--TAN')

What's a good function header?
assistant
#Here's a good function header.

def test_wcs_sip_handling():