def METHOD_NAME(create_files_in_directory):
    filelist, outdir = create_files_in_directory
    mni = freesurfer.MNIBiasCorrection()
    # make sure command gets called
    assert mni.cmd == "mri_nu_correct.mni"
    # test raising error with mandatory args absent
    with pytest.raises(ValueError):
        mni.cmdline
    # test with minimal args
    mni.inputs.in_file = filelist[0]
    base, ext = os.path.splitext(os.path.basename(filelist[0]))
    if ext == ".gz":
        base, ext2 = os.path.splitext(base)
        ext = ext2 + ext
    assert mni.cmdline == (
        f"mri_nu_correct.mni --i {filelist[0]} --n 4 --o {base}_output{ext}"
    )
    # test with custom outfile
    mni.inputs.out_file = "new_corrected_file.mgz"
    assert mni.cmdline == (
        "mri_nu_correct.mni --i %s --n 4 --o new_corrected_file.mgz" % (filelist[0])
    )
    # constructor based tests
    mni2 = freesurfer.MNIBiasCorrection(
        in_file=filelist[0], out_file="bias_corrected_output", iterations=2
    )
    assert mni2.cmdline == (
        "mri_nu_correct.mni --i %s --n 2 --o bias_corrected_output" % filelist[0]
    )