code: def set_edge_weight(self, edge, wt):
          
          self.set_edge_properties(edge, weight=wt )
          if not self.DIRECTED:
              self.set_edge_properties((edge[1], edge[0]) , weight=wt )
docs: Set the weight of an edge.
  
          @type  edge: edge
          @param edge: One edge.
  
          @type  wt: number
          @param wt: Edge weight.