def _resolve_source(self, source):
if os.path.isdir(source):<EOL><INDENT>sources = glob.glob(os.path.join(source, '<STR_LIT>'))<EOL>if len(sources) == <NUM_LIT:0>:<EOL><INDENT>raise ModelLoadError('<STR_LIT>')<EOL><DEDENT>elif len(sources) > <NUM_LIT:1>:<EOL><INDENT>raise ModelLoadError(<EOL>'<STR_LIT>')<EOL><DEDENT>return sources[<NUM_LIT:0>]<EOL><DEDENT>return source<EOL>
Resolve source to filepath if it is a directory.