@pimms.param<EOL><INDENT>def subject_id(sid):<DEDENT>
if sid is None: return None<EOL>try: sid = int(sid)<EOL>except Exception: raise ValueError('<STR_LIT>')<EOL>if sid < <NUM_LIT> or sid > <NUM_LIT>: raise ValueError('<STR_LIT>')<EOL>return sid<EOL>
sub.subject_id is the 6-digit HCP subject id of the subject sub, or None if sub was loaded
from a non-standard source.