code: def test_trans_distances(tmpdir):
      from ...interfaces.vtkbase import tvtk
  
      in_surf = example_data("surf01.vtk")
      warped_surf = tmpdir.join("warped.vtk").strpath
  
      inc = np.array([0.7, 0.3, -0.2])
  
      r1 = tvtk.PolyDataReader(file_name=in_surf)
      vtk1 = VTKInfo.vtk_output(r1)
      r1.update()
      vtk1.points = np.array(vtk1.points) + inc
  
      writer = tvtk.PolyDataWriter(file_name=warped_surf)
      VTKInfo.configure_input_data(writer, vtk1)
      writer.write()
  
      dist = m.ComputeMeshWarp()
      dist.inputs.surface1 = in_surf
      dist.inputs.surface2 = warped_surf
      dist.inputs.out_file = tmpdir.join("distance.npy").strpath
      res = dist.run()
      assert np.allclose(res.outputs.distance, np.linalg.norm(inc), 4)
      dist.inputs.weighting = "area"
      res = dist.run()
      assert np.allclose(res.outputs.distance, np.linalg.norm(inc), 4)
  
file_path: nipype/nipype/algorithms/tests/test_mesh_ops.py
imports: import os
  import pytest
  import nipype.testing
  from nipype.testing import example_data
  import numpy
  from nipype.algorithms import mesh
  from ...interfaces import vtkbase
label_desc: Use image node_id 2 for calling a global function with example usage: test_trans_distances(tmpdir) without return types