code: def test_resample_img_segmentation_fault():
      # see https://github.com/nilearn/nilearn/issues/346
      shape_in = (64, 64, 64)
      aff_in = np.diag([2.0, 2.0, 2.0, 1.0])
      aff_out = np.diag([3.0, 3.0, 3.0, 1.0])
      # fourth_dim = 1024 works fine but for 1025 creates a segmentation
      # fault with scipy < 0.14.1
      fourth_dim = 1025
  
      try:
          data = np.ones(shape_in + (fourth_dim,), dtype=np.float64)
      except MemoryError:
          # This can happen on AppVeyor and for 32-bit Python on Windows
          pytest.skip("Not enough RAM to run this test")
      else:
          img_in = Nifti1Image(data, aff_in)
  
          resample_img(
              img_in, target_affine=aff_out, interpolation="nearest"
          )
  
imports: import copy
  import math
  import os
  from pathlib import Path
  import numpy
  import pytest
  from nibabel import Nifti1Header, Nifti1Image
  from nibabel.freesurfer import MGHImage
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal, assert_equal
  from nilearn import _utils
  from nilearn._utils import testing
  from nilearn.conftest import _affine_eye, _rng
  from nilearn.image import get_data
  from nilearn.image.image import _pad_array, crop_img
  from nilearn.image.resampling import BoundingBoxError, coord_transform, from_matrix_vector, get_bounds, reorder_img, resample_img, resample_to_img
label_desc: Use image node_id 34 for calling a global function with example usage: test_resample_img_segmentation_fault() without return types