def METHOD_NAME(
    physionet_tmpdir, subject, recording, download_is_error
):
    """Test handling of missing recordings in Sleep Physionet age fetcher."""
    with pytest.raises(
        ValueError, match=f"Requested recording {recording} for subject"
    ):
        age.fetch_data(
            subjects=[subject],
            recording=[recording],
            on_missing="raise",
            path=physionet_tmpdir,
        )
    with pytest.warns(
        RuntimeWarning, match=f"Requested recording {recording} for subject"
    ):
        age.fetch_data(
            subjects=[subject],
            recording=[recording],
            on_missing="warn",
            path=physionet_tmpdir,
        )
    paths = age.fetch_data(
        subjects=[subject],
        recording=[recording],
        on_missing="ignore",
        path=physionet_tmpdir,
    )
    assert paths == []