code: def test_load_surf_mesh_file_glob(tmp_path):
      mesh = generate_surf()
      _, fname1 = tempfile.mkstemp(suffix=".pial", dir=str(tmp_path))
  
      nb.freesurfer.write_geometry(fname1, mesh[0], mesh[1])
      _, fname2 = tempfile.mkstemp(suffix=".pial", dir=str(tmp_path))
  
      nb.freesurfer.write_geometry(fname2, mesh[0], mesh[1])
  
      with pytest.raises(
          ValueError, match="More than one file matching path"
      ):
          load_surf_mesh(
              os.path.join(os.path.dirname(fname1), "*.pial")
          )
      with pytest.raises(ValueError, match="No files matching path"):
          load_surf_mesh(
              os.path.join(os.path.dirname(fname1), "*.unlikelysuffix")
          )
      assert len(load_surf_mesh(fname1)) == 2
      assert_array_almost_equal(load_surf_mesh(fname1)[0], mesh[0])
      assert_array_almost_equal(load_surf_mesh(fname1)[1], mesh[1])
  
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 15 for calling a global function with example usage: test_load_surf_mesh_file_glob(tmp_path) without return types