@classmethod
    def get_instances(cls):
        instances = []

        data = cls.database.get_all_values(cls.data)[1:]

        for n, fields in enumerate([row for row in data if any(row)], start=1):
            instances.append(
                cls._init_with_id(n, *fields[:len(cls.columns)]))

        return instances
A modified version of the update_upstream method.
dataset/ETHPy150Open Widdershin/butterdb/butterdb/butterdb.py/Model.get_instances--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/controlflow/fold.py/FoldWithModule.update_upstream