def make_safe_label(label):
    """Avoid name clashes with GraphViz reserved words such as 'graph'."""
    unsafe_words = 'digraph', 'graph', 'cluster', 'subgraph'
    out = label
    for word in unsafe_words:
        out = out.replace(word, '%sX' % word)
    return out.replace('.', '__').replace('*', '')
