'Returns the CourseGrade for the given user in the course.
Reads the value from storage and validates that the grading
policy hasn\'t changed since the grade was last computed.
If not in storage, returns a ZeroGrade if ASSUME_ZERO_GRADE_IF_ABSENT.
Else, if changed or not in storage, computes and returns a new value.
At least one of course, collected_block_structure, course_structure,
or course_key should be provided.'

def create(self, user, course=None, collected_block_structure=None, course_structure=None, course_key=None):

    course_data = CourseData(user, course, collected_block_structure, course_structure, course_key)
    try:
        (course_grade, read_policy_hash) = self._read(user, course_data)
        if (read_policy_hash == course_data.grading_policy_hash):
            return course_grade
        read_only = False
    except PersistentCourseGrade.DoesNotExist:
        if assume_zero_if_absent(course_data.course_key):
            return self._create_zero(user, course_data)
        read_only = True
    return self._update(user, course_data, read_only)
