def METHOD_NAME(physionet_tmpdir, fake_retrieve):
    """Test Sleep Physionet URL handling."""
    paths = age.fetch_data(subjects=[0], recording=[1], path=physionet_tmpdir)
    assert _keep_basename_only(paths[0]) == [
        "SC4001E0-PSG.edf",
        "SC4001EC-Hypnogram.edf",
    ]
    paths = age.fetch_data(subjects=[0, 1], recording=[1], path=physionet_tmpdir)
    assert _keep_basename_only(paths[0]) == [
        "SC4001E0-PSG.edf",
        "SC4001EC-Hypnogram.edf",
    ]
    assert _keep_basename_only(paths[1]) == [
        "SC4011E0-PSG.edf",
        "SC4011EH-Hypnogram.edf",
    ]
    paths = age.fetch_data(subjects=[0], recording=[1, 2], path=physionet_tmpdir)
    assert _keep_basename_only(paths[0]) == [
        "SC4001E0-PSG.edf",
        "SC4001EC-Hypnogram.edf",
    ]
    assert _keep_basename_only(paths[1]) == [
        "SC4002E0-PSG.edf",
        "SC4002EC-Hypnogram.edf",
    ]
    EXPECTED_CALLS = (
        {
            "name": "SC4001E0-PSG.edf",
            "hash": "adabd3b01fc7bb75c523a974f38ee3ae4e57b40f",
        },
        {
            "name": "SC4001EC-Hypnogram.edf",
            "hash": "21c998eadc8b1e3ea6727d3585186b8f76e7e70b",
        },
        {
            "name": "SC4011E0-PSG.edf",
            "hash": "4d17451f7847355bcab17584de05e7e1df58c660",
        },
        {
            "name": "SC4011EH-Hypnogram.edf",
            "hash": "d582a3cbe2db481a362af890bc5a2f5ca7c878dc",
        },
        {
            "name": "SC4002E0-PSG.edf",
            "hash": "c6b6d7a8605cc7e7602b6028ee77f6fbf5f7581d",
        },
        {
            "name": "SC4002EC-Hypnogram.edf",
            "hash": "386230188a3552b1fc90bba0fb7476ceaca174b6",
        },
    )
    base_path = age.data_path(path=physionet_tmpdir)
    _check_mocked_function_calls(fake_retrieve, EXPECTED_CALLS, base_path)