def METHOD_NAME(self):
    """Serializes all loaded modules and updates self._files again."""
    for idx, model in self._loaded_models.items():
        handler = self._get_handler(self.files_def.get(idx).type)
        if handler is None:
            self._files[idx] = model
        else:
            self._files[idx] = handler.serialize(model)