def _load_state(self, config):
        data = {}
        path = os.path.join(config.apppath, 'bundles')

        # find all 'validations' folders:
        folders = {}
        for root, dirs, files in os.walk(path):
            validations = filter(lambda f: f == 'validations', dirs)
            folders.update(dict((f, []) for f in map(
                lambda f: os.path.join(root, f), validations)))

        # list all files in these folders
        for k, folder in folders.items():
            for root, dirs, files in os.walk(k):
                files = filter(lambda f: f.endswith('.json'), files)
                folder += map(lambda f: os.path.join(
                    os.path.relpath(root, k), f), files)

        data['directories'] = folders

        return data
Find all JSON-schema files in the directory structure
dataset/ETHPy150Open gengo/decanter/decanter/lib/loaders.py/JSONLoader._load_state