@@ -158,12 +158,19 @@ def _default_parameters_parsing(node):
158158
159159 # note that this block is similar but not identical to adding connected
160160 # nodes
161+ standalone_input = None
161162 for i , (_ , x ) in enumerate (not_used_nodes .items ()):
162163 vals_x , input_x , output_x = _default_parameters_parsing (x )
163- if at in input_x [0 ][1 ]:
164+ if input_x and at in input_x [0 ][1 ]:
164165 input_x [0 ][1 ] = at
165- else :
166+ elif input_x :
166167 input_x [0 ][1 ] = '** WARNING, NOT DEFINED **'
168+ else :
169+ # if we get to this point it means that these are "standalone"
170+ # commands, thus is fine to link them to the same raw data
171+ if standalone_input is None :
172+ standalone_input = vals_x [0 ]
173+ input_x = [['' , at ]]
167174
168175 name_x = vals_x [0 ]
169176 if vals_x not in (nodes ):
@@ -173,7 +180,14 @@ def _default_parameters_parsing(node):
173180 name = inputs [b ]
174181 else :
175182 name = 'input_%s_%s' % (name_x , b )
176- nodes .append ([name , a , b ])
183+ # if standalone_input == name_x then this is the first time
184+ # we are adding an standalone command and we need to add the node
185+ # (only once) and store the name of the node for future usage
186+ if standalone_input == name_x :
187+ nodes .append ([name , a , b ])
188+ standalone_input = name
189+ else :
190+ name = standalone_input
177191 edges .append ([name , vals_x [0 ]])
178192 for a , b in output_x :
179193 name = 'output_%s_%s' % (name_x , b )
0 commit comments