def constant_thresholds(graph, value):
    """Sets a constant threshold for every node of the graph."""

    # Store threshold assignment in a dictionary
    thresholds = dict()

    # Add a constant attribute to each node
    for node in graph.Nodes():
        thresholds[node.GetId()] = value

    return thresholds