def METHOD_NAME(self, record):
    """Called before a record is committed."""
    original_record = record.__class__.get_record_by_pid(record.pid)
    diff = DeepDiff(
        original_record, record,
        verbose_level=2,
        exclude_paths=self.exclude_path
    )
    if diff:
        super().METHOD_NAME(record)