<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_prj(self, atypes=None, deps=None):
 """Create and return a new project :param atypes: add the given atypes to the project :type atypes: list | None :param deps: add the given departmetns to the project :type deps: list | None :returns: The created project or None :rtype: None | :class:`jukeboxcore.djadapter.models.Project` :raises: None """

        dialog = ProjectCreatorDialog(parent=self)
        dialog.exec_()
        prj = dialog.project
        if prj and atypes:
            for at in atypes:
                at.projects.add(prj)
                at.save()
        if prj and deps:
            for dep in deps:
                dep.projects.add(prj)
                dep.save()
        if prj:
            prjdata = djitemdata.ProjectItemData(prj)
            treemodel.TreeItem(prjdata, self.prjs_model.root)
        return prj