def process_assets_from_disk(self, config, path=None):
        """Looks at a path and finds all the assets in the folder.
        Looks in a subfolder based on the asset's path string.
        Crawls subfolders too. The first subfolder it finds is used for the
        asset's default config section.
        If an asset has a related entry in the config file, it will create
        the asset with that config. Otherwise it uses the default

        Args:
            config: A dictionary which contains a list of asset names with
                settings that will be used for the specific asset. (Note this
                is not needed for all assets, as any asset file found not in the
                config dictionary will be set up with the folder it was found
                in's asset_defaults settings.)
            path: A full system path to the root folder that will be searched
                for assetsk. This should *not* include the asset-specific path
                string. If omitted, only the machine's root folder will be
                searched.

        """
        if not path:
            path = self.machine.machine_path

        if not config:
            config = dict()

        root_path = os.path.join(path, self.path_string)

        self.log.debug("Processing assets from base folder: %s", root_path)

        for path, _, files in os.walk(root_path, followlinks=True):

            valid_files = [f for f in files if f.endswith(self.file_extensions)]

            for file_name in valid_files:
                folder = os.path.basename(path)
                name = os.path.splitext(file_name)[0].lower()
                full_file_path = os.path.join(path, file_name)

                if folder == self.path_string or folder not in self.defaults:
                    default_string = 'default'
                else:
                    default_string = folder

                #print "------"
                #print "path:", path
                #print "full_path", full_file_path
                #print "file:", file_name
                #print "name:", name
                #print "folder:", folder
                #print "default settings name:", default_string
                #print "default settings:", self.defaults[default_string]

                built_up_config = copy.deepcopy(self.defaults[default_string])

                for k, v in config.iteritems():

                    if (v in 'file' and v['file'] == file_name) or name == k:
                        if name != k:
                            name = k
                            #print "NEW NAME:", name
                        built_up_config.update(config[k])
                        break

                built_up_config['file'] = full_file_path

                config[name] = built_up_config

                self.log.debug("Registering Asset: %s, File: %s, Default Group:"
                               " %s, Final Config: %s", name, file_name,
                               default_string, built_up_config)

        return config
dataset/ETHPy150Open missionpinball/mpf/mpf/system/assets.py/AssetManager.process_assets_from_disk/swapped operands of `in`