def add_class(self, cls, include_bases=True):
        """Add the specified class (which should be a class object, _not_ a
        string). By default all base classes for which is_backup_class returns
        True will also be added. `include_bases=False` may be spcified to
        suppress this behavior. The total number of classes added is returned.
        Note that if is_backup_class does not return True for the class object
        passed in, 0 will be returned. If you specify include_bases=False, then
        the maximum value that can be returned is 1."""
        if not is_backup_class(cls):
            return 0

        added = 0

        cls_name = backup_name(cls)
        if cls_name not in self.classes:
            self.classes[cls_name] = cls
            self.log("Added class for backup: %s", cls_name)
            added = 1

        if include_bases:
            for candidate_cls in getmro(cls):
                if is_backup_class(cls):
                    # Note that we don't keep recursing on base classes
                    added += self.add_class(candidate_cls, include_bases=False)

        return added
dataset/ETHPy150Open memphis-iis/GLUDB/gludb/backup.py/Backup.add_class/original