<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def can_join_group(self, project):
 """Return whether or not user can join a group on `project`."""

        if project.class_.is_locked or project.group_max < 2:
            return False
        u2g = self.fetch_group_assoc(project)
        if u2g:
            return len(list(u2g.group.users)) < project.group_max
        return True