def compute_edge_widths(self):
        """Compute the edge widths."""
        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
Compute the edge widths.