Highlighting partitions in distinct color
I would change this
for i in range(len(partitions)):
    items = list(partitions[i])   # convert from set
    for j in range(len(items)):
        edge_color_list[items[j]] = get_color((i+1)/len(partitions)

to:
for idx, partition in enumerate(partitions): # I personally do it your way 
    items = list(partition)   # convert from set
    for item in items: 
        edge_color_list[items] = get_color((idx+1)/len(partitions) 
        # idx is the `i` from before 

I referenced this.
There might be a linting plugin to help align your code towards being pythonic