code: def test_domain_from_mesh():
      """Test domain_from_mesh method"""
      coords = np.array(
          [
              [0.0, 0.0, 0.0],
              [0.0, 0.0, 1.0],
              [0.0, 1.0, 0.0],
              [1.0, 0.0, 0.0],
          ]
      )
      triangles = np.asarray(
          [[0, 1, 2], [0, 1, 3], [0, 2, 3], [1, 2, 3]]
      )
      darrays = [
          nbg.GiftiDataArray(coords, datatype="NIFTI_TYPE_FLOAT32"),
          nbg.GiftiDataArray(triangles, datatype="NIFTI_TYPE_INT32"),
      ]
      toy_image = nbg.GiftiImage(darrays=darrays)
      domain = domain_from_mesh(toy_image)
      # if we get there, we could build the domain, and that's what we wanted.
      assert_array_equal(domain.get_coord(), coords)
  
imports: import nibabel.gifti
  import numpy
  from nibabel import Nifti1Image
  from numpy.testing import assert_almost_equal, assert_array_equal
  from ..discrete_domain import domain_from_binary_array, domain_from_image, domain_from_mesh, grid_domain_from_binary_array, grid_domain_from_image, grid_domain_from_shape, smatrix_from_3d_array, smatrix_from_nd_array, smatrix_from_nd_idx
label_desc: Use image node_id 20 for calling a global function with example usage: test_domain_from_mesh() without return types