code: def test_sleep_physionet_age_missing_subjects(
      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 == []
  
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 7 for calling a global function with example usage: test_sleep_physionet_age_missing_subjects(physionet_tmpdir, subject, download_is_error) without return types