def filter_G_edgeweights(G, synapse_count):
    """Filter the edges in a graph.
    
    # Arguments
    G: NetworkX graph to filter.
    synapse_count: Synapse number filter to use.
    
    # Returns
    G: The modified graph.
    """
    edges_to_remove = []
    for i in G.edges(data=True):
        if i[2]['weight'] < synapse_count:
            edges_to_remove.append([i[0],i[1]])
    for i in edges_to_remove:
        G.remove_edge(i[0],i[1])
    for i in G.nodes():
        G.nodes()[i]['label'] = i
    return G