def iterconfig(config, scan_type):
if scan_type in config:<EOL><INDENT>for modality,scans in iter(config[scan_type].items()):<EOL><INDENT>for scan in scans:<EOL><INDENT>scan.update({<EOL>'<STR_LIT:type>': scan_type,<EOL>'<STR_LIT>': modality<EOL>})<EOL>yield scan<EOL><DEDENT><DEDENT><DEDENT>
Iterate over BIDS configuration file