'Sets up a cohort for each previously created user partition.'

def setup_cohorts(self, course):

    config_course_cohorts(course, is_cohorted=True)
    self.partition_cohorts = []
    for user_partition in self.user_partitions:
        partition_cohorts = []
        for group in self.groups:
            cohort = CohortFactory(course_id=course.id)
            partition_cohorts.append(cohort)
            link_cohort_to_partition_group(cohort, user_partition.id, group.id)
        self.partition_cohorts.append(partition_cohorts)
