def course_in(courses):
    """Constraint the course to a given list of courses.

    List of courses is represented as "{abbreviation} {course_number}"
    e.g. course_in(["COMPSCI 61A", "BIO 1A"])
    """
    def satisfies(course):
        key = "%s %s" % (course.abbreviation, course.course_number)
        return key in courses
    return satisfies