def disrupt_network(G, property, thresh, fail_value):
    """
    #### Function for disrupting a graph given a threshold value against a node's value ####
    Any edges which bind to broken nodes have their 'time' property set to fail_value
     REQUIRED: G - a graph containing one or more nodes and one or more edges
               property - the element in the data dictionary for the edges to test
               thresh - values of data[property] above this value are disrupted
               fail_value - the data['time'] property is set to this value to
               simulate the removal of the edge
     RETURNS:  a modified graph with the edited 'time' attribute
    #--------------------------------------------------------------------------#
    """
    G_copy = G.copy()
    broken_nodes = []
    for u, data in G_copy.nodes(data=True):
        if data[property] > thresh:
            broken_nodes.append(u)
    print('nodes disrupted: %s' % len(broken_nodes))
    i = 0
    for u, v, data in G_copy.edges(data=True):
        if u in broken_nodes or v in broken_nodes:
            data['time'] = fail_value
            i += 1
    print('edges disrupted: %s' % i)
    return G_copy
