code: def compute_edge_widths(self):
          
          if type(self.edge_width) is str:
              edges = self.graph.edges
              self.edge_widths = [edges[n][self.edge_width] for n in self.edges]
          else:
              self.edge_widths = self.edge_width
docs: Compute the edge widths.