Add get_pid_of_neighbour function for all nodes of the edges