code: def test_seg_lab_fusion():
      """Test interfaces for seg_labfusion"""
      # Create a node object
      steps = LabelFusion()
  
      # Check if the command is properly defined
      cmd = get_custom_path("seg_LabFusion", env_dir="NIFTYSEGDIR")
      assert steps.cmd == cmd
  
      # test raising error with mandatory args absent
      with pytest.raises(ValueError):
          steps.run()
  
      # Assign some input data
      in_file = example_data("im1.nii")
      file_to_seg = example_data("im2.nii")
      template_file = example_data("im3.nii")
      steps.inputs.in_file = in_file
      steps.inputs.kernel_size = 2.0
      steps.inputs.file_to_seg = file_to_seg
      steps.inputs.template_file = template_file
      steps.inputs.template_num = 2
      steps.inputs.classifier_type = "STEPS"
  
      cmd_tmp = "{cmd} -in {in_file} -STEPS 2.000000 2 {file_to_seg} \
  {template_file} -out {out_file}"
  
      expected_cmd = cmd_tmp.format(
          cmd=cmd,
          in_file=in_file,
          file_to_seg=file_to_seg,
          template_file=template_file,
          out_file="im1_steps.nii",
      )
  
      assert steps.cmdline == expected_cmd
  
      # Staple
      staple = LabelFusion(
          kernel_size=2.0, template_num=2, classifier_type="STAPLE"
      )
      in_file = example_data("im1.nii")
      file_to_seg = example_data("im2.nii")
      template_file = example_data("im3.nii")
      staple.inputs.in_file = in_file
      staple.inputs.file_to_seg = file_to_seg
      staple.inputs.template_file = template_file
  
      cmd_tmp = "{cmd} -in {in_file} -STAPLE -ALL -out {out_file}"
      expected_cmd = cmd_tmp.format(
          cmd=cmd,
          in_file=in_file,
          file_to_seg=file_to_seg,
          template_file=template_file,
          out_file="im1_staple.nii",
      )
  
      assert staple.cmdline == expected_cmd
  
      # Assign some input data
      mv_node = LabelFusion(
          template_num=2,
          classifier_type="MV",
          sm_ranking="ROINCC",
          dilation_roi=2,
      )
      in_file = example_data("im1.nii")
      file_to_seg = example_data("im2.nii")
      template_file = example_data("im3.nii")
      mv_node.inputs.in_file = in_file
      mv_node.inputs.file_to_seg = file_to_seg
      mv_node.inputs.template_file = template_file
  
      cmd_tmp = "{cmd} -in {in_file} -MV -ROINCC 2 2 {file_to_seg} \
  {template_file} -out {out_file}"
  
      expected_cmd = cmd_tmp.format(
          cmd=cmd,
          in_file=in_file,
          file_to_seg=file_to_seg,
          template_file=template_file,
          out_file="im1_mv.nii",
      )
  
      assert mv_node.cmdline == expected_cmd
  
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 LabelFusion, CalcTopNCC
label_desc: Use image node_id 1 for calling a global function with example usage: test_seg_lab_fusion() without return types