'Is the course defined by course_id contained in the order?'

@classmethod
def contained_in_order(cls, order, course_id):

    return (course_id in [item.course_id for item in order.orderitem_set.all().select_subclasses('courseregcodeitem') if isinstance(item, cls)])
