human
Complete the below
@pytest.mark.skipif(no_fsl(), reason=u'fsl    is    not    installed')
def test_fast_list_outputs(setup_infile):

    ''''By default (no -o), FSL\'s fast command outputs files into the same
    directory as the input files. If the flag -o is set, it outputs files into
    the cwd'
    '''
assistant
#Here is the Python program you requested.
    def _run_and_test(opts, output_base):
        outputs = fsl.FAST(**opts)._list_outputs()
        for output in outputs.values():
            if output:
                for filename in filename_to_list(output):
                    assert os.path.realpath(filename).startswith(os.path.realpath(output_base))
    (tmp_infile, indir) = setup_infile
    cwd = tempfile.mkdtemp()
    os.chdir(cwd)
    assert (indir != cwd)
    out_basename = u'a_basename'
    opts = {u'in_files': tmp_infile}
    (input_path, input_filename, input_ext) = split_filename(tmp_infile)
    _run_and_test(opts, os.path.join(input_path, input_filename))
    opts[u'out_basename'] = out_basename
    _run_and_test(opts, os.path.join(cwd, out_basename))