code: def test_multimaths(create_files_in_directory_plus_output_type):
      (
          files,
          testdir,
          out_ext,
      ) = create_files_in_directory_plus_output_type
  
      # Get the command
      maths = fsl.MultiImageMaths(in_file="a.nii", out_file="c.nii")
  
      # Test the underlying command
      assert maths.cmd == "fslmaths"
  
      # Test that it fails without an operation an
      with pytest.raises(ValueError):
          maths.run()
  
      # Test a few operations
      maths.inputs.operand_files = ["a.nii", "b.nii"]
      opstrings = [
          "-add %s -div %s",
          "-max 1 -sub %s -min %s",
          "-mas %s -add %s",
      ]
      for ostr in opstrings:
          maths.inputs.op_string = ostr
          assert maths.cmdline == "fslmaths a.nii %s c.nii" % ostr % (
              "a.nii",
              "b.nii",
          )
  
      # Test that we don't need to ask for an out file
      maths = fsl.MultiImageMaths(
          in_file="a.nii",
          op_string="-add %s -mul 5",
          operand_files=["b.nii"],
      )
      assert (
          maths.cmdline
          == "fslmaths a.nii -add b.nii -mul 5 %s"
          % os.path.join(testdir, "a_maths%s" % out_ext)
      )
  
imports: import os
  import numpy
  from nipype.interfaces.base import Undefined
  import nipype.interfaces.fsl.maths
  from nipype.interfaces.fsl import no_fsl
  import pytest
  from nipype.testing.fixtures import create_files_in_directory_plus_output_type
label_desc: Use image node_id 14 for calling a global function with example usage: test_multimaths(create_files_in_directory_plus_output_type) without return types