code: def get_edge_attr(self, n, m, attr):
          '''
          API: get_edge_attr(self, n, m, attr)
          Description:
          Returns attribute attr of edge (n,m).
          Input:
              n: Source node name.
              m: Sink node name.
              attr: Attribute of edge.
          Pre:
              Graph should have this edge.
          Return:
              Value of edge attribute attr.
          '''
          if self.graph_type is DIRECTED_GRAPH:
              return self.edge_attr[(n,m)][attr]
          else:
              try:
                  return self.edge_attr[(n,m)][attr]
              except KeyError:
                  return self.edge_attr[(m,n)][attrf get_edge_attr(self, n, m, attr):
          '''
          API: get_edge_attr(self, n, m, attr)
          Description:
          Returns attribute attr of edge (n,m).
          Input:
              n: Source node name.
              m: Sink node name.
              attr: Attribute of edge.
          Pre:
              Graph should have this edge.
          Return:
              Value of edge attribute attr.
          '''
          if self.graph_type is DIRECTED_GRAPH:
              return self.edge_attr[(n,m)][attr]
          else:
              try:
                  return self.edge_attr[(n,m)][attr]
              except KeyError:
                  return self.edge_attr[(m,n)][attr]
docs: API: get_edge_attr(self, n, m, attr)
          Description:
          Returns attribute attr of edge (n,m).
          Input:
              n: Source node name.
              m: Sink node name.
              attr: Attribute of edge.
          Pre:
              Graph should have this edge.
          Return:
              Value of edge attribute attr.