def METHOD_NAME():
    """Test Spectrum.from_file overrides calibration with cal_kwargs."""
    fname = os.path.join(
        TEST_OUTPUTS, "spectrum_io__test_write_h5__applied_energy_cal.h5"
    )
    domain = [-100, 10000]
    rng = [-10, 1000]
    params = [0.6]
    # load without the calibration override
    spec = bq.Spectrum.from_file(fname)
    assert not np.allclose(spec.energy_cal.domain, domain)
    assert not np.allclose(spec.energy_cal.rng, rng)
    assert not np.allclose(spec.energy_cal.params, params)
    # load with the calibration override
    spec = bq.Spectrum.from_file(
        fname, cal_kwargs={"domain": domain, "rng": rng, "params": params}
    )
    assert np.allclose(spec.energy_cal.domain, domain)
    assert np.allclose(spec.energy_cal.rng, rng)
    assert np.allclose(spec.energy_cal.params, params)