code: def reader_from_path(cls, path):
          
          context = FilePathContext(path)
          try:
              with open(context.filepath, 'r') as f:
                  return ModelReader(f, context)
          except IOError:
              # Try to open the default file
              for filename in cls.DEFAULT_MODEL:
                  try:
                      context = FilePathContext(
                          os.path.join(path, filename))
                      with open(context.filepath, 'r') as f:
                          return ModelReader(f, context)
                  except:
                      logger.debug('Failed to load model file',
                                   exc_info=True)
  
          # No model could be loaded
          raise ParseError('No model file could be found ({})'.format(
              ', '.join(cls.DEFAULT_MODEL)))
docs: 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.