def collect(package='perch.migrations'):
    """
    Import all modules inside the perch.migrations package and return the
    registered migrations
    """
    package = importlib.import_module(package)

    for loader, name, is_pkg in pkgutil.walk_packages(package.__path__):
        importlib.import_module(package.__name__ + '.' + name)

    return _migrations
def collect ( package = 'perch.migrations' ) : package = importlib . import_module ( package ) for loader , name , is_pkg in pkgutil . walk_packages ( package . __path__ ) : importlib . import_module ( package . __name__ + '.' + name ) return _migrations
Import all modules inside the perch.migrations package and return the
    registered migrations