def _load_fsLR_atlasroi(filename, data):
(fdir, fnm) = os.path.split(filename)<EOL>fparts = fnm.split('<STR_LIT:.>')<EOL>atl = fparts[-<NUM_LIT:3>]<EOL>if atl in _load_fsLR_atlasroi.atlases: return _load_fsLR_atlasroi.atlases[atl]<EOL>sid = data['<STR_LIT:id>']<EOL>fnm = [os.path.join(fdir, '<STR_LIT>' % (sid, h, atl))  for h in ('<STR_LIT:L>', '<STR_LIT:R>')]<EOL>if data['<STR_LIT>']:<EOL><INDENT>dat = [{'<STR_LIT:id>':data['<STR_LIT:id>'], '<STR_LIT:type>':'<STR_LIT>', '<STR_LIT:name>':'<STR_LIT>', '<STR_LIT>':h} for h in data['<STR_LIT>']]<EOL><DEDENT>else:<EOL><INDENT>dat = [{'<STR_LIT:id>':data['<STR_LIT:id>'], '<STR_LIT:type>':'<STR_LIT>', '<STR_LIT:name>':'<STR_LIT>', '<STR_LIT>':(h + data['<STR_LIT>'][<NUM_LIT:2>:])}<EOL>for h in ('<STR_LIT>','<STR_LIT>')]<EOL><DEDENT>rois = tuple([_load(f, d).astype('<STR_LIT:bool>') for (f,d) in zip(fnm, dat)])<EOL>if atl != '<STR_LIT>': _load_fsLR_atlasroi.atlases[atl] = rois<EOL>return rois<EOL>
Loads the appropriate atlas for the given data; data may point to a cifti file whose atlas is
needed or to an atlas file.