'Emits an edx.grades.course.grade_calculated event
with data from the passed grade.'

@staticmethod
def _emit_grade_calculated_event(grade):

    event_name = u'edx.grades.course.grade_calculated'
    context = contexts.course_context_from_course_id(grade.course_id)
    with tracker.get_tracker().context(event_name, context):
        tracker.emit(event_name, {'user_id': unicode(grade.user_id), 'course_id': unicode(grade.course_id), 'course_version': unicode(grade.course_version), 'percent_grade': grade.percent_grade, 'letter_grade': unicode(grade.letter_grade), 'course_edited_timestamp': unicode(grade.course_edited_timestamp), 'event_transaction_id': unicode(get_event_transaction_id()), 'event_transaction_type': unicode(get_event_transaction_type()), 'grading_policy_hash': unicode(grade.grading_policy_hash)})
