code: def test_distancemap(create_files_in_directory):
      mapper = fsl.DistanceMap()
  
      files, newdir = create_files_in_directory
  
      # Test the underlying command
      assert mapper.cmd == "distancemap"
  
      # It shouldn't run yet
      with pytest.raises(ValueError):
          mapper.run()
  
      # But if we do this...
      mapper.inputs.in_file = "a.nii"
  
      # It should
      assert (
          mapper.cmdline
          == "distancemap --out=%s --in=a.nii"
          % os.path.join(newdir, "a_dstmap.nii")
      )
  
      # And we should be able to write out a maxima map
      mapper.inputs.local_max_file = True
      assert (
          mapper.cmdline
          == "distancemap --out={} --in=a.nii --localmax={}".format(
              os.path.join(newdir, "a_dstmap.nii"),
              os.path.join(newdir, "a_lclmax.nii"),
          )
      )
  
      # And call it whatever we want
      mapper.inputs.local_max_file = "max.nii"
      assert (
          mapper.cmdline
          == "distancemap --out=%s --in=a.nii --localmax=max.nii"
          % os.path.join(newdir, "a_dstmap.nii")
      )
  
file_path: nipype/nipype/interfaces/fsl/tests/test_dti.py
imports: import os
  import nipype.interfaces.fsl.dti
  from nipype.interfaces.fsl import Info, no_fsl
  from nipype.interfaces.base import Undefined
  import pytest
  from nipype.testing.fixtures import create_files_in_directory
label_desc: Use image node_id 8 for calling a global function with example usage: test_distancemap(create_files_in_directory) without return types