def compute_assertions(self, courses, progress_assertions):
    '\n        Computes the fulfillment of this requirement based on progress assertions, and returns\n        True if the requirement has an assertion available or False otherwise.\n\n        Assertions are in the format of a dictionary keyed by requirements list paths, where the\n        values are dictionaries containing three possible keys: "substitutions", which should be a\n        list of course IDs that combine to substitute for the requirement, "ignore", which\n        indicates that the requirement is not to be used when satisfying later requirements, and\n        "override", which is equivalent to the old manual progress value and indicates a progress\n        toward the requirement in the unit specified by the requirement\'s threshold type (only\n        used if the requirement is a plain string requirement and has a threshold). The order of\n        precedence is override, ignore, substitutions.\n        '
    self.assertion = progress_assertions.get(self.list_path, None)
    self.is_bypassed = False
    if (self.assertion is not None):
        substitutions = self.assertion.get('substitutions', None)
        ignore = self.assertion.get('ignore', False)
        override = self.assertion.get('override', 0)
    else:
        substitutions = None
        ignore = False
        override = 0
    if (self.statement.is_plain_string and (self.threshold is not None) and override):
        self.override_requirement(override)
        return True
    if ignore:
        self.is_fulfilled = False
        subject_progress = Progress(0, 0)
        self.subject_fulfillment = subject_progress
        self.subject_progress = subject_progress.progress
        self.subject_max = subject_progress.max
        unit_progress = Progress(0, 0)
        self.unit_fulfillment = unit_progress
        self.unit_progress = unit_progress.progress
        self.unit_max = unit_progress.max
        progress = Progress(0, 0)
        self.progress = progress.progress
        self.progress_max = progress.max
        self.percent_fulfilled = progress.get_percent()
        self.fraction_fulfilled = progress.get_fraction()
        self.satisfied_courses = []
        return True
    if (substitutions is not None):
        satisfied_courses = set()
        subs_satisfied = 0
        units_satisfied = 0
        for sub in substitutions:
            for course in courses:
                if course.satisfies(sub, courses):
                    subs_satisfied += 1
                    units_satisfied += course.total_units
                    satisfied_courses.add(course)
                    break
        if (self.statement.is_plain_string and (self.threshold is not None)):
            subject_progress = Progress(subs_satisfied, self.threshold.cutoff_for_criterion(CRITERION_SUBJECTS))
            unit_progress = Progress(units_satisfied, self.threshold.cutoff_for_criterion(CRITERION_UNITS))
            progress = (subject_progress if (self.threshold.criterion == CRITERION_SUBJECTS) else unit_progress)
            self.is_fulfilled = (progress.progress == progress.max)
        else:
            subject_progress = Progress(subs_satisfied, len(substitutions))
            self.is_fulfilled = (subs_satisfied == len(substitutions))
            unit_progress = Progress((subs_satisfied * DEFAULT_UNIT_COUNT), (len(substitutions) * DEFAULT_UNIT_COUNT))
            progress = subject_progress
        self.subject_fulfillment = subject_progress
        self.subject_progress = subject_progress.progress
        self.subject_max = subject_progress.max
        self.unit_fulfillment = unit_progress
        self.unit_progress = unit_progress.progress
        self.unit_max = unit_progress.max
        self.progress = progress.progress
        self.progress_max = progress.max
        self.percent_fulfilled = progress.get_percent()
        self.fraction_fulfilled = progress.get_fraction()
        self.satisfied_courses = list(satisfied_courses)
        return True
    return False
Computes the fulfillment of this requirement based on progress assertions, and returns
True if the requirement has an assertion available or False otherwise.

Assertions are in the format of a dictionary keyed by requirements list paths, where the
values are dictionaries containing three possible keys: "substitutions", which should be a
list of course IDs that combine to substitute for the requirement, "ignore", which
indicates that the requirement is not to be used when satisfying later requirements, and
"override", which is equivalent to the old manual progress value and indicates a progress
toward the requirement in the unit specified by the requirement's threshold type (only
used if the requirement is a plain string requirement and has a threshold). The order of
precedence is override, ignore, substitutions.
def compute_assertions(self, courses, progress_assertions):
    '\n        Computes the fulfillment of this requirement based on progress assertions, and returns\n        True if the requirement has an assertion available or False otherwise.\n\n        Assertions are in the format of a dictionary keyed by requirements list paths, where the\n        values are dictionaries containing three possible keys: "substitutions", which should be a\n        list of course IDs that combine to substitute for the requirement, "ignore", which\n        indicates that the requirement is not to be used when satisfying later requirements, and\n        "override", which is equivalent to the old manual progress value and indicates a progress\n        toward the requirement in the unit specified by the requirement\'s threshold type (only\n        used if the requirement is a plain string requirement and has a threshold). The order of\n        precedence is override, ignore, substitutions.\n        '
    self.assertion = progress_assertions.get(self.list_path, None)
    self.is_bypassed = False
    if (self.assertion is not None):
        substitutions = self.assertion.get('substitutions', None)
        ignore = self.assertion.get('ignore', False)
        override = self.assertion.get('override', 0)
    else:
        substitutions = None
        ignore = False
        override = 0
    if (self.statement.is_plain_string and (self.threshold is not None) and override):
        self.override_requirement(override)
        return True
    if ignore:
        self.is_fulfilled = False
        subject_progress = Progress(0, 0)
        self.subject_fulfillment = subject_progress
        self.subject_progress = subject_progress.progress
        self.subject_max = subject_progress.max
        unit_progress = Progress(0, 0)
        self.unit_fulfillment = unit_progress
        self.unit_progress = unit_progress.progress
        self.unit_max = unit_progress.max
        progress = Progress(0, 0)
        self.progress = progress.progress
        self.progress_max = progress.max
        self.percent_fulfilled = progress.get_percent()
        self.fraction_fulfilled = progress.get_fraction()
        self.satisfied_courses = []
        return True
    if (substitutions is not None):
        satisfied_courses = set()
        subs_satisfied = 0
        units_satisfied = 0
        for sub in substitutions:
            for course in courses:
                if course.satisfies(sub, courses):
                    subs_satisfied += 1
                    units_satisfied += course.total_units
                    satisfied_courses.add(course)
                    break
        if (self.statement.is_plain_string and (self.threshold is not None)):
            subject_progress = Progress(subs_satisfied, self.threshold.cutoff_for_criterion(CRITERION_SUBJECTS))
            unit_progress = Progress(units_satisfied, self.threshold.cutoff_for_criterion(CRITERION_UNITS))
            progress = (subject_progress if (self.threshold.criterion == CRITERION_SUBJECTS) else unit_progress)
            self.is_fulfilled = (progress.progress == progress.max)
        else:
            subject_progress = Progress(subs_satisfied, len(substitutions))
            self.is_fulfilled = (subs_satisfied == len(substitutions))
            unit_progress = Progress((subs_satisfied * DEFAULT_UNIT_COUNT), (len(substitutions) * DEFAULT_UNIT_COUNT))
            progress = subject_progress
        self.subject_fulfillment = subject_progress
        self.subject_progress = subject_progress.progress
        self.subject_max = subject_progress.max
        self.unit_fulfillment = unit_progress
        self.unit_progress = unit_progress.progress
        self.unit_max = unit_progress.max
        self.progress = progress.progress
        self.progress_max = progress.max
        self.percent_fulfilled = progress.get_percent()
        self.fraction_fulfilled = progress.get_fraction()
        self.satisfied_courses = list(satisfied_courses)
        return True
    return False