def ModelOption(model):
yngkpmatch = re.compile('<STR_LIT>'.format('<STR_LIT>'.join([m[<NUM_LIT:1> : ] for m in yngkp_modelvariants])))<EOL>if yngkpmatch.search(model):<EOL><INDENT>return model<EOL><DEDENT>elif len(model) > <NUM_LIT:6> and model[ : <NUM_LIT:6>] == '<STR_LIT>':<EOL><INDENT>fname = model[<NUM_LIT:6> : ]<EOL>if os.path.isfile(fname):<EOL><INDENT>return ('<STR_LIT>', fname)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" % fname)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>
Returns *model* if a valid choice.

    Returns the string if it specifies a ``YNGKP_`` model variant.

    Returns *('ExpCM', prefsfile)* if it specifies an ``ExpCM_`` model.