'Draws the edge as a line with the given stroke and strokewidth (increased with Edge.weight).
Override this method in a subclass for custom drawing.'

def draw(self, weighted=False, directed=False):

    w = ((weighted and self.weight) or 0)
    line(self.node1.x, self.node1.y, self.node2.x, self.node2.y, stroke=self.stroke, strokewidth=(self.strokewidth + w))
    if directed:
        self.draw_arrow(stroke=self.stroke, strokewidth=(self.strokewidth + w))
