code: def check_edge(self, name1, name2):
          '''
          API: check_edge(self, name1, name2)
          Description:
          Return True if edge exists, False otherwise.
          Input:
              name1: name of the source node.
              name2: name of the sink node.
          Return:
              Returns True if edge exists, False otherwise.
          '''
          if self.graph_type is DIRECTED_GRAPH:
              return (name1, name2) in self.edge_attr
          else:
              return ((name1, name2) in self.edge_attr or
                      (name2, name1) in self.edge_attrf check_edge(self, name1, name2):
          '''
          API: check_edge(self, name1, name2)
          Description:
          Return True if edge exists, False otherwise.
          Input:
              name1: name of the source node.
              name2: name of the sink node.
          Return:
              Returns True if edge exists, False otherwise.
          '''
          if self.graph_type is DIRECTED_GRAPH:
              return (name1, name2) in self.edge_attr
          else:
              return ((name1, name2) in self.edge_attr or
                      (name2, name1) in self.edge_attr)
docs: API: check_edge(self, name1, name2)
          Description:
          Return True if edge exists, False otherwise.
          Input:
              name1: name of the source node.
              name2: name of the sink node.
          Return:
              Returns True if edge exists, False otherwise.