docs: def edge_by_node(self, head, tail):
          """
          Returns the edge that connects the head_id and tail_id nodes
          """
          for edge in self.out_edges(head):
              if self.tail(edge) == tail:
                  return edge
          return None