def load_retinotopy_cache(sdir, sid, alignment='<STR_LIT>'):
fs = {h:{(k,kk):os.path.join(sdir, '<STR_LIT>', v % (h, alignment))<EOL>for (kk,vv) in six.iteritems(_retinotopy_cache_tr)<EOL>for (k,v)   in six.iteritems(vv)}<EOL>for h in ('<STR_LIT>','<STR_LIT>')}<EOL>files = {}<EOL>for h in ['<STR_LIT>','<STR_LIT>']:<EOL><INDENT>for ((k,kk),v) in six.iteritems(fs[h]):<EOL><INDENT>if not os.path.isfile(v): continue<EOL>hh = _retinotopy_cache_surf_tr[v.split('<STR_LIT:.>')[-<NUM_LIT:2>]] % (h, alignment)<EOL>if hh not in files: files[hh] = {}<EOL>files[hh][k] = v<EOL><DEDENT><DEDENT>if len(files) == <NUM_LIT:0>: return files<EOL>def _loader(fls, h, k): return (lambda:nyio.load(fls[h][k]))<EOL>return {h:pimms.lazy_map({k:_loader(files, h, k) for k in six.iterkeys(v)})<EOL>for (h,v) in six.iteritems(files)}<EOL>
Returns the subject's retinotopy cache as a lazy map, or None if no cache exists. The hemi keys
in the returned map will spell out the cortex name (e.g., lh_native_MSMAll or rh_LR32k_MSMAll).