<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_project(self, project):
 """Set the project selection to the given project :param project: the project to select :type project: :class:`djadapter.models.Project` :returns: None :rtype: None :raises: ValueError """

        prjroot = self.prjbrws.model.root
        prjitems = prjroot.childItems
        for row, item in enumerate(prjitems):
            prj = item.internal_data()
            if prj == project:
                prjindex = self.prjbrws.model.index(row, 0)
                break
        else:
            raise ValueError("Could not select the given taskfile. No project %s found." % project.name)
        self.prjbrws.set_index(0, prjindex)