def format_attributes(callable, *args):
    """
    Format the results of *callable* in the format expected
    by Graphviz.
    """
    value = callable(*args)
    if not value:
        return ""

    else:
        parts = []
        for k in sorted(value):
            parts.append(f"{k}={value[k]}")
        return f" [{', '.join(parts)}]"