code: def test_merge():
      # Create a node object
      merge = Merge()
  
      # Check if the command is properly defined
      cmd = get_custom_path("seg_maths", env_dir="NIFTYSEGDIR")
      assert merge.cmd == cmd
  
      # test raising error with mandatory args absent
      with pytest.raises(ValueError):
          merge.run()
  
      # Assign some input data
      in_file = example_data("im1.nii")
      file1 = example_data("im2.nii")
      file2 = example_data("im3.nii")
      merge.inputs.in_file = in_file
      merge.inputs.merge_files = [file1, file2]
      merge.inputs.dimension = 2
      merge.inputs.output_datatype = "float"
  
      cmd_tmp = (
          "{cmd} {in_file} -merge 2 2 {f1} {f2} -odt float {out_file}"
      )
      expected_cmd = cmd_tmp.format(
          cmd=cmd,
          in_file=in_file,
          f1=file1,
          f2=file2,
          out_file="im1_merged.nii",
      )
  
      assert merge.cmdline == expected_cmd
  
file_path: nipype/nipype/interfaces/niftyseg/tests/test_maths.py
imports: import pytest
  from ....testing import example_data
  from ...niftyreg import get_custom_path
  from ...niftyreg.tests.test_regutils import no_nifty_tool
  from ..None import UnaryMaths, BinaryMaths, BinaryMathsInteger, TupleMaths, Merge
label_desc: Use image node_id 5 for calling a global function with example usage: test_merge() without return types