code: def test_intersect_masks_filename(affine_eye, tmp_path):
      # Create dummy masks
      mask_a = np.zeros((4, 4, 1), dtype=bool)
      mask_a[2:4, 2:4] = 1
      mask_a_img = Nifti1Image(mask_a.astype("int32"), affine_eye)
  
      # +---+---+---+---+
      # |   |   |   |   |
      # +---+---+---+---+
      # |   |   |   |   |
      # +---+---+---+---+
      # |   |   | X | X |
      # +---+---+---+---+
      # |   |   | X | X |
      # +---+---+---+---+
  
      mask_b = np.zeros((4, 4, 1), dtype=bool)
      mask_b[1:3, 1:3] = 1
      mask_b_img = Nifti1Image(mask_b.astype("int32"), affine_eye)
  
      # +---+---+---+---+
      # |   |   |   |   |
      # +---+---+---+---+
      # |   | X | X |   |
      # +---+---+---+---+
      # |   | X | X |   |
      # +---+---+---+---+
      # |   |   |   |   |
      # +---+---+---+---+
  
      filenames = write_imgs_to_path(
          mask_a_img, mask_b_img, file_path=tmp_path, create_files=True
      )
      mask_ab = np.zeros((4, 4, 1), dtype=bool)
      mask_ab[2, 2] = 1
      mask_ab_ = intersect_masks(filenames, threshold=1.0)
      assert_array_equal(mask_ab, get_data(mask_ab_))
  
imports: import warnings
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from numpy.testing import assert_array_equal
  from sklearn.preprocessing import StandardScaler
  from nilearn import masking
  from nilearn._utils import data_gen
  from nilearn._utils.exceptions import DimensionError
  from nilearn._utils.testing import write_imgs_to_path
  from nilearn.conftest import _rng
  from nilearn.image import get_data, high_variance_confounds
  from nilearn.maskers import NiftiMasker
  from nilearn.masking import _MaskWarning, _unmask_3d, _unmask_4d, compute_background_mask, compute_brain_mask, compute_epi_mask, compute_multi_brain_mask, compute_multi_epi_mask, extrapolate_out_mask, intersect_masks, unmask, unmask_from_to_3d_array
label_desc: Use image node_id 11 for calling a global function with example usage: test_intersect_masks_filename(affine_eye, tmp_path) without return types