<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load(cls, path, format=None):
 """Load project from file. Use ``format`` to specify the file format to use. Path can be a file-like object, in which case format is required. Otherwise, can guess the appropriate format from the extension. If you pass a file-like object, you're responsible for closing the file. :param path: Path or file pointer. :param format: :attr:`KurtFileFormat.name` eg. ``"scratch14"``. Overrides the extension. :raises: :class:`UnknownFormat` if the extension is unrecognised. :raises: :py:class:`ValueError` if the format doesn't exist. """

        path_was_string = isinstance(path, basestring)
        if path_was_string:
            (folder, filename) = os.path.split(path)
            (name, extension) = os.path.splitext(filename)
            if format is None:
                plugin = kurt.plugin.Kurt.get_plugin(extension=extension)
                if not plugin:
                    raise UnknownFormat(extension)
            fp = open(path, "rb")
        else:
            fp = path
            assert format, "Format is required"
            plugin = kurt.plugin.Kurt.get_plugin(format)

        if not plugin:
            raise ValueError, "Unknown format %r" % format

        project = plugin.load(fp)
        if path_was_string:
            fp.close()
        project.convert(plugin)
        if isinstance(path, basestring):
            project.path = path
            if not project.name:
                project.name = name
        return project