Internal use. Creates all variables in the problem instance for the given
        courses. If given a dict of {course: sections}, will use the provided sections.

def create_variables(self, courses):
        """Internal use. Creates all variables in the problem instance for the given
        courses. If given a dict of {course: sections}, will use the provided sections.
        """
        has_sections = isinstance(courses, dict)
        for course in courses:
            self.p.add_variable(course, courses.get(course, []) if has_sections else self.get_sections(course))