@staticmethod<EOL><INDENT>def load_mgh_images(name, path):<DEDENT>
<EOL>path = os.path.join(path, '<STR_LIT>')<EOL>fls = [f<EOL>for p in [path, os.path.join(path, '<STR_LIT>')]<EOL>if os.path.isdir(p)<EOL>for fname in os.listdir(p) for f in [os.path.join(p, fname)]<EOL>if f[<NUM_LIT:0>] != '<STR_LIT:.>'<EOL>if len(f) > <NUM_LIT:4> and f[-<NUM_LIT:4>:].lower() in ['<STR_LIT>', '<STR_LIT>']<EOL>if os.path.isfile(f)]<EOL>def _make_loader(fname):<EOL><INDENT>def _loader():<EOL><INDENT>return _load_imm_mgh(fname)<EOL><DEDENT>return _loader<EOL><DEDENT>return pimms.lazy_map({os.path.split(flnm)[-<NUM_LIT:1>][:-<NUM_LIT:4>]: _make_loader(flnm) for flnm in fls})<EOL>
Subject.load_mgh_images(name, path) yields a persistent map of the MGHImage objects for all
  the valid mgz files in the relevant subject's FreeSurfer mri/ directory (where the subject
  directory is given by path).