'course_id: Course id of the item to find
Returns OrderItem from the Order given a course_id
Raises exception ItemNotFoundException when the item
having the given course_id is not present in the cart'

def find_item_by_course_id(self, course_id):

    cart_items = OrderItem.objects.filter(order=self).select_subclasses()
    found_items = []
    for item in cart_items:
        if getattr(item, 'course_id', None):
            if (item.course_id == course_id):
                found_items.append(item)
    if (not found_items):
        raise ItemNotFoundInCartException
    return found_items
