'Fetch the group to which this user is linked in this partition, or None.'

def get_group_for_user(self, course_id, user, user_partition):

    return self.current_group.get(user.id, {}).get(user_partition.id)
