I am trying to make a graph which for each item in a dictionary contains another dictionary of the neighbours and weights. I am using \'not in\' to test to see if the curren