def METHOD_NAME(self, nb: NotebookNode) -> None:
    super(MetadataValidatorV2, self).METHOD_NAME(nb)
    ids = set([])
    for cell in nb.cells:
        if 'nbgrader' not in cell.metadata:
            continue
        grade = cell.metadata['nbgrader']['grade']
        solution = cell.metadata['nbgrader']['solution']
        locked = cell.metadata['nbgrader']['locked']
        if not grade and not solution and not locked:
            continue
        grade_id = cell.metadata['nbgrader']['grade_id']
        if grade_id in ids:
            raise ValidationError("Duplicate grade id: {}".format(grade_id))
        ids.add(grade_id)