I would prefer applying this condition mask on the output of the NiftiMasker, rather than on the input. That way you can simply pass "dataset_files.func" to the NiftiMasker.