code: def _check_mocked_function_calls(
      mocked_func, call_fname_hash_pairs, base_path
  ):
      # Check mocked_func has been called the right amount of times.
      assert mocked_func.call_count == len(call_fname_hash_pairs)
  
      # Check it has been called with the right parameters in the right
      # order.
      for idx, current in enumerate(call_fname_hash_pairs):
          _, call_kwargs = mocked_func.call_args_list[idx]
          hash_type, hash = call_kwargs["known_hash"].split(":")
          assert call_kwargs["url"] == _get_expected_url(
              current["name"]
          ), idx
          assert Path(
              call_kwargs["path"], call_kwargs["fname"]
          ) == _get_expected_path(base_path, current["name"])
          assert hash == current["hash"]
          assert hash_type == "sha1"
  
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 5 for calling a global function with example usage: _check_mocked_function_calls(mocked_func, call_fname_hash_pairs, base_path) without return types