code: def test_smooth(create_files_in_directory_plus_output_type):
      (
          files,
          testdir,
          out_ext,
      ) = create_files_in_directory_plus_output_type
  
      # Get the command
      smoother = fsl.IsotropicSmooth(in_file="a.nii", out_file="b.nii")
  
      # Test the underlying command
      assert smoother.cmd == "fslmaths"
  
      # Test that smoothing kernel is mandatory
      with pytest.raises(ValueError):
          smoother.run()
  
      # Test smoothing kernels
      cmdline = "fslmaths a.nii -s {:.5f} b.nii"
      for val in [0, 1.0, 1, 25, 0.5, 8 / 3.0]:
          smoother = fsl.IsotropicSmooth(
              in_file="a.nii", out_file="b.nii", sigma=val
          )
          assert smoother.cmdline == cmdline.format(val)
          smoother = fsl.IsotropicSmooth(
              in_file="a.nii", out_file="b.nii", fwhm=val
          )
          val = float(val) / np.sqrt(8 * np.log(2))
          assert smoother.cmdline == cmdline.format(val)
  
      # Test automatic naming
      smoother = fsl.IsotropicSmooth(in_file="a.nii", sigma=5)
      assert smoother.cmdline == "fslmaths a.nii -s {:.5f} {}".format(
          5, os.path.join(testdir, f"a_smooth{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 7 for calling a global function with example usage: test_smooth(create_files_in_directory_plus_output_type) without return types