```python
Write a DDUF file from an iterable of entries.

This is a lower-level helper than [`export_folder_as_dduf`] that allows more flexibility when serializing data.
In particular, you don't need to save the data on disk before exporting it in the DDUF file.

Args:
dduf_path (`str` or `os.PathLike`):
The path to the DDUF file to write.
entries (`Iterable[Tuple[str, Union[str, Path, bytes]]]`):
An iterable of entries to write in the DDUF file. Each entry is a tuple with the filename and the content.
The filename should be the path to the file in the DDUF archive.
The content can be a string or a pathlib.Path representing a path to a file on the local disk or directly the content as bytes.

Raises:
- [`DDUFExportError`]: If anything goes wrong during the export (e.g. invalid entry name, missing 'model_index.json', etc.).

Example:
```python