def METHOD_NAME(
    physionet_tmpdir, subject, download_is_error
):
    """Test handling of missing subjects in Sleep Physionet age fetcher."""
    with pytest.raises(ValueError, match="This dataset contains subjects 0 to 82"):
        age.fetch_data(
            subjects=[subject], recording=[1], on_missing="raise", path=physionet_tmpdir
        )
    with pytest.warns(RuntimeWarning, match="This dataset contains subjects 0 to 82"):
        age.fetch_data(
            subjects=[subject], recording=[1], on_missing="warn", path=physionet_tmpdir
        )
    paths = age.fetch_data(
        subjects=[subject], recording=[1], on_missing="ignore", path=physionet_tmpdir
    )
    assert paths == []