Add all classes to the backup in the specified package (including
        all modules and all sub-packages) for which is_backup_class returns
        True. Note that self.add_class is used, so base classes will added as
        well.

        Parameters:
        * pkg_name - a string representing the package name. It may be
          relative _if_ parent_pkg is supplied as well
        * recurse - (default value of True) if False, sub-packages will _not_
          be examined
        * include_bases - (default value of True) is passed directly to
          add_class for every class added
        * parent_pkg - a string representing the parent package of the relative
          package specified in pkg_name. Note that you should specify
          parent_pkg _only_ if pkg_name should be interpreted as relative

        An an example of both relative and absolute package imports, these
        are equivalent:

        ````
        backup.add_package('toppackage.subpackage')
        backup.add_package('subpackage', parent_pkg='toppackage')
        ````

def add_package(
        self,
        pkg_name,
        recurse=True,
        include_bases=True,
        parent_pkg=None
    ):
        """Add all classes to the backup in the specified package (including
        all modules and all sub-packages) for which is_backup_class returns
        True. Note that self.add_class is used, so base classes will added as
        well.

        Parameters:
        * pkg_name - a string representing the package name. It may be
          relative _if_ parent_pkg is supplied as well
        * recurse - (default value of True) if False, sub-packages will _not_
          be examined
        * include_bases - (default value of True) is passed directly to
          add_class for every class added
        * parent_pkg - a string representing the parent package of the relative
          package specified in pkg_name. Note that you should specify
          parent_pkg _only_ if pkg_name should be interpreted as relative

        An an example of both relative and absolute package imports, these
        are equivalent:

        ````
        backup.add_package('toppackage.subpackage')
        backup.add_package('subpackage', parent_pkg='toppackage')
        ````
        """
        if parent_pkg:
            pkg = import_module('.' + pkg_name, parent_pkg)
        else:
            pkg = import_module(pkg_name)

        for module_loader, name, ispkg in pkgutil.walk_packages(pkg.__path__):
            if not ispkg:
                # Module
                mod = import_module('.' + name, pkg_name)
                for name, member in getmembers(mod):
                    if is_backup_class(member):
                        self.add_class(member, include_bases=include_bases)
            elif recurse:
                # Package and we're supposed to recurse
                self.add_package(
                    pkg_name + '.' + name,
                    recurse=True,
                    include_bases=include_bases,
                    parent_pkg=parent_pkg
                )