Nipype Mrtrix3.Tractography Error: Not parsing input tuple for a node

I’ve been trying to set up a pipeline to run tractography. This is what it looks like right now:

            (infosource, selectfiles, [('subject_id','subject_id')]),
            
            (selectfiles, mrtrix3_dwi2response, [('bvec','in_bvec'),
                                                 ('bval','in_bval'),
                                                 ('data','in_file')]),

            (mrtrix3_dwi2response, mrtrix3_dwi2fod, [('wm_file', 'wm_txt')]),
            
            (selectfiles, mrtrix3_dwi2fod, [('bvec', 'in_bvec'),
                                            ('bval', 'in_bval'),
                                            ('data', 'in_file')]),

            (mrtrix3_dwi2fod, mrtrix3_tckgen, [('wm_odf', 'in_file')]),
            **(selectfiles, mrtrix3_tckgen, [(('mask', 3), 'seed_grid_voxel')]),**
            
            (selectfiles, mrtrix3_tck2connectome, [('aparc', 'in_parc')]),
            (mrtrix3_tckgen, mrtrix3_tck2connectome, [('out_file', 'in_file')]),
            
            (mrtrix3_tck2connectome, datasink, [('out_file','connectome.csv')]),

Right now the line in question is (selectfiles, mrtrix3_tckgen, [((‘mask’, 3), ‘seed_grid_voxel’)]).

The description for this node on nipype is for mrtrix3.Tractography(). And in the documentation, it says:

seed_grid_voxel: (a tuple of the form: (an existing file name, an
integer (int or long)))
seed a fixed number of streamlines per voxel in a mask image; place
seeds on a 3D mesh grid (grid_size argument is per axis; so a
grid_size of 3 results in 27 seeds per voxel)
flag: -seed_grid_per_voxel %s %d
mutually_exclusive: seed_image, seed_rnd_voxel

Currently, the error that I get when I input the tuple of the form (an existing file name, an integer) - in this case (‘mask’, 3), the error message I get is:
TypeError: module, class, method, function, traceback, frame, or code object was expected, got int

This confuses me because the documentation said to input an integer as the second tuple input. But this apparently didn’t work.

So in order to try to fix this, I tried changing the tuple to (‘mask’, ‘3’). This gave me progress, but sent me to this next error:
line 537, in _get_inputs
info[1][1], info[1][2], value)
IndexError: tuple index out of range

I’m wondering now if there’s an issue with nipype itself in parsing the tuple? Or if there’s a problem with the way that I’m inputting the integer.

If I could get any help on understanding how to use mrtrix3.Tractography’s (seed_grid_voxel) input, that’d be great!