code: def _make_diff(old, new, both):
      
      # make a copy of old topology to avoid tampering with it
      diff_edges = new.copy()
      not_different = [tuple(edge) for edge in both]
      diff_edges.remove_edges_from(not_different)
      # repeat operation with nodes
      diff_nodes = new.copy()
      not_different = []
      for new_node in new.nodes():
          if new_node in old.nodes():
              not_different.append(new_node)
      diff_nodes.remove_nodes_from(not_different)
      # return tuple with modified graphs
      # one for nodes and one for links
      return diff_nodes, diff_edges
docs: calculates differences between topologies 'old' and 'new'
      returns a tuple with two network graph objects
      the first graph contains the added nodes, the secnod contains the added links