def _publish_grade(self, score, only_if_higher=None):
        """
        Publish a grade to the runtime.
        """
        grade_dict = {
            'value': score.raw_earned,
            'max_value': score.raw_possible,
            'only_if_higher': only_if_higher,
        }
        self.runtime.publish(self, 'grade', grade_dict)
Publish a grade to the runtime.