code: def test_sleep_physionet_age_missing_recordings(
      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 == []
  
file_path: mne-python/mne/datasets/sleep_physionet/tests/test_physionet.py
imports: from pathlib import Path
  import pytest
  from mne.datasets.sleep_physionet import age, temazepam
  from mne.datasets.sleep_physionet._utils import AGE_SLEEP_RECORDS, TEMAZEPAM_SLEEP_RECORDS, _update_sleep_age_records, _update_sleep_temazepam_records
  from mne.utils import requires_good_network
label_desc: Use image node_id 8 for calling a global function with example usage: test_sleep_physionet_age_missing_recordings(physionet_tmpdir, subject, recording, download_is_error) without return types