def METHOD_NAME(toolinfo: dict, with_option: bool) -> bool:
    """
    Print the results.
    Return True indicating that something was printed.
    """
    printed = False
    for group, gval in sorted(toolinfo.items()):
        for host, hostitems in sorted(gval.items()):
            label = hostitems["label"]
            host_string = f"host: {host}" + (f", label: {label}" if label else "")
            tools = hostitems["tools"]
            if tools:
                if not with_option:
                    tool_string = ", ".join(sorted(tools.keys()))
                else:
                    tools_with_options = (
                        f"{t} {' '.join(v)}" for t, v in sorted(tools.items())
                    )
                    tool_string = ", ".join(tools_with_options)
                print(f"group: {group}; {host_string}; tools: {tool_string}")
                printed = True
    return printed