code: def test_load_surf_data_file_error(tmp_path):
      # test if files with unexpected suffixes raise errors
      data = np.zeros((20,))
      wrong_suff = [".vtk", ".obj", ".mnc", ".txt"]
      for suff in wrong_suff:
          fd, filename_wrong = tempfile.mkstemp(
              suffix=suff, dir=str(tmp_path)
          )
          os.close(fd)
          np.savetxt(filename_wrong, data)
          with pytest.raises(
              ValueError, match="input type is not recognized"
          ):
              load_surf_data(filename_wrong)
          os.remove(filename_wrong)
  
imports: import os
  import tempfile
  import warnings
  import nibabel
  import numpy
  import pytest
  from nibabel import gifti
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from scipy.spatial import Delaunay
  from scipy.stats import pearsonr
  from nilearn import datasets, image
  from nilearn._utils import data_gen
  from nilearn.image import resampling
  from nilearn.surface import Mesh, Surface, load_surf_data, load_surf_mesh, surface
  from nilearn.surface.surface import _gifti_img_to_mesh, _load_surf_files_gifti_gzip
  from nilearn.surface.tests._testing import flat_mesh, generate_surf, z_const_img
label_desc: Use image node_id 6 for calling a global function with example usage: test_load_surf_data_file_error(tmp_path) without return types