@classmethod<EOL><INDENT>def reader_from_path(cls, path):<DEDENT>
context = FilePathContext(path)<EOL>try:<EOL><INDENT>with open(context.filepath, '<STR_LIT:r>') as f:<EOL><INDENT>return ModelReader(f, context)<EOL><DEDENT><DEDENT>except IOError:<EOL><INDENT>for filename in cls.DEFAULT_MODEL:<EOL><INDENT>try:<EOL><INDENT>context = FilePathContext(<EOL>os.path.join(path, filename))<EOL>with open(context.filepath, '<STR_LIT:r>') as f:<EOL><INDENT>return ModelReader(f, context)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>logger.debug('<STR_LIT>',<EOL>exc_info=True)<EOL><DEDENT><DEDENT><DEDENT>raise ParseError('<STR_LIT>'.format(<EOL>'<STR_LIT:U+002CU+0020>'.join(cls.DEFAULT_MODEL)))<EOL>
Create a model from specified path.

        Path can be a directory containing a ``model.yaml`` or ``model.yml``
        file or it can be a path naming the central model file directly.