def add_edge_attribute(self, edge, attr):
self.edge_attr[edge] = self.edge_attributes(edge) + [attr]<EOL>if (not self.DIRECTED and edge[<NUM_LIT:0>] != edge[<NUM_LIT:1>]):<EOL><INDENT>self.edge_attr[(edge[<NUM_LIT:1>],edge[<NUM_LIT:0>])] = self.edge_attributes((edge[<NUM_LIT:1>], edge[<NUM_LIT:0>])) + [attr]<EOL><DEDENT>
Add attribute to the given edge.

@type  edge: edge
@param edge: One edge.

@type  attr: tuple
@param attr: Node attribute specified as a tuple in the form (attribute, value).