<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _load_models(self) -> None: """Maybe load all the models to be assembled together and save them to the ``self._models`` attribute."""

        if self._models is None:
            logging.info('Loading %d models', len(self._model_paths))

            def load_model(model_path: str):
                logging.debug('\tloading %s', model_path)
                if path.isdir(model_path):
                    model_path = path.join(model_path, CXF_CONFIG_FILE)
                config = load_config(model_path)
                config['model']['inputs'] = self._inputs
                config['model']['outputs'] = self._outputs

                return create_model(config, output_dir=None, dataset=self._dataset,
                                    restore_from=path.dirname(model_path))

            self._models = list(map(load_model, self._model_paths))