Connect another vertex to this one.

        Args:
            vertex (Vertex): vertex to connect from.
            weight (int): weight of the edge.

        Returns:
            Edge: the newly created edge.

def connect_from(self, vertex, weight=1):
        """
        Connect another vertex to this one.

        Args:
            vertex (Vertex): vertex to connect from.
            weight (int): weight of the edge.

        Returns:
            Edge: the newly created edge.
        """
        for edge in self.edges_in:
            if vertex == edge.vertex_out:
                return edge
        return Edge(vertex, self, weight)