code: def test_should_download_resampled_images_only_if_no_previous_download(
      tmp_path,
  ):
      collections, _ = _get_neurovault_data()
  
      sample_collection = collections.iloc[0]
      sample_collection_id = sample_collection["id"]
      expected_number_of_images = sample_collection[
          "true_number_of_images"
      ]
  
      data = neurovault.fetch_neurovault_ids(
          collection_ids=[sample_collection_id],
          data_dir=tmp_path,
          resample=True,
      )
  
      # Check the expected size of the dataset
      assert (len(data["images_meta"])) == expected_number_of_images
  
      _check_resampled_version_is_here(data)
  
      _check_all_affines_match_neurovault_affine(data)
  
      _check_original_version_is_not_here(data)
  
imports: import hashlib
  import json
  import os
  import re
  import stat
  from urllib import parse
  import numpy
  import pandas
  import pytest
  import requests
  from nilearn._utils.data_gen import generate_fake_fmri
  from nilearn.conftest import _rng
  from nilearn.datasets import neurovault
  from nilearn.image import load_img
label_desc: Use image node_id 43 for calling a global function with example usage: test_should_download_resampled_images_only_if_no_previous_download(tmp_path) without return types