code: def test_unary_stats():
      """Test for the seg_stats interfaces"""
      # Create a node object
      unarys = UnaryStats()
  
      # Check if the command is properly defined
      cmd = get_custom_path("seg_stats", env_dir="NIFTYSEGDIR")
      assert unarys.cmd == cmd
  
      # test raising error with mandatory args absent
      with pytest.raises(ValueError):
          unarys.run()
  
      # Assign some input data
      in_file = example_data("im1.nii")
      unarys.inputs.in_file = in_file
      unarys.inputs.operation = "a"
  
      expected_cmd = f"{cmd} {in_file} -a"
  
      assert unarys.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 UnaryStats, BinaryStats
label_desc: Use image node_id 1 for calling a global function with example usage: test_unary_stats() without return types