def METHOD_NAME(systeminfo, logbase, printer=None, plugin_manager=None):
    from octoprint.util import to_bytes
    try:
        z = ZipStream(compress_type=ZIP_DEFLATED)
    except RuntimeError:
        # no zlib support
        z = ZipStream(sized=True)
    if printer and printer.is_operational():
        firmware_info = printer.firmware_info
        if firmware_info:
            # add firmware to systeminfo so it's included in systeminfo.txt
            systeminfo["printer.firmware"] = firmware_info["name"]
        # Add printer log, if available
        if hasattr(printer, "_log"):
            z.add(to_bytes("\n".join(printer._log)), arcname="terminal.txt")
    # add systeminfo
    systeminfotxt = []
    for k in sorted(systeminfo.keys()):
        systeminfotxt.append(f"{k}: {systeminfo[k]}")
    z.add(to_bytes("\n".join(systeminfotxt)), arcname="systeminfo.txt")
    # add logs
    for log in (
        "octoprint.log",
        "serial.log",
        "tornado.log",
    ):
        logpath = os.path.join(logbase, log)
        if os.path.exists(logpath):
            z.add_path(logpath, arcname=log)
    # add additional bundle contents from bundled plugins
    if plugin_manager:
        for name, hook in plugin_manager.get_hooks(
            "octoprint.systeminfo.additional_bundle_files"
        ).items():
            try:
                plugin = plugin_manager.get_plugin_info(name)
                if not plugin.bundled:
                    # we only support this for bundled plugins because we don't want
                    # third party logs to blow up the bundles
                    continue
                logs = hook()
                for log, content in logs.items():
                    if isinstance(content, str):
                        # log path
                        if os.path.exists(content) and os.access(content, os.R_OK):
                            z.add_path(content, arcname=log)
                    elif callable(content):
                        # content generating callable
                        try:
                            z.add(to_bytes(content()), arcname=log)
                        except Exception:
                            logging.getLogger(__name__).exception(
                                f"Error while executing callable for additional bundle content {log} for plugin {name}",
                                extra={"plugin": name},
                            )
            except Exception:
                logging.getLogger(__name__).exception(
                    f"Error while retrieving additional bundle contents for plugin {name}",
                    extra={"plugin": name},
                )
    return z