def find_subject_path(sid):
<EOL>sub = str(sid)<EOL>sdirs = config['<STR_LIT>']<EOL>if _auto_download_options is not None and '<STR_LIT>' in _auto_download_options:<EOL><INDENT>sdirs = list(sdirs) + [_auto_download_options['<STR_LIT>']]<EOL><DEDENT>if os.path.isdir(sub): return os.path.abspath(sub)<EOL>pth = next((os.path.abspath(p) for sd in sdirs<EOL>for p in [os.path.join(sd, sub)]<EOL>if os.path.isdir(p)),<EOL>None)<EOL>if pth is not None: return pth<EOL>if _auto_download_options is None or not _auto_download_options['<STR_LIT>'] ornot _auto_downloadable(sid):<EOL><INDENT>return None<EOL><DEDENT>pth = os.path.join(_auto_download_options['<STR_LIT>'], sub)<EOL>if os.path.isdir(pth): return pth<EOL>try: os.makedirs(os.path.abspath(pth), <NUM_LIT>)<EOL>except Exception: return None<EOL>return pth<EOL>
find_subject_path(sub) yields the full path of a HCP subject with the name given by the string
  sub, if such a subject can be found in the HCP search paths. See also add_subject_path.

If no subject is found, then None is returned.