code: def add_violations(self, violations, record=None):
          
          rec = {} if record is None else record
          for v in violations:
              self._viol.append((v, rec))
docs: Add constraint violations and associated record.
  
          :param violations: List of violations
          :type violations: list(ConstraintViolation)
          :param record: Associated record
          :type record: dict
          :rtype: None