<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_path(cls, path):
 """ Instantiates a project class from a given path. :param path: app folder path source code Returns A project instance. """

    if os.path.exists(path) is False:
      raise errors.InvalidPathError(path)
    return cls(path=path)