class_docstr: A directed graph that can easily be JSON serialized for visualization.
  
  When serializing, it generates the following fields:
    edge: The list of all serialized Edge instances.
    node: The list of all serialized Vertex instances.
docstr: Returns a new edge connecting source and target vertices.
  
  Args:
    source: The source Vertex.
    target: The target Vertex.
  
  Returns:
    A new Edge linking source to target.
docstr_tok: ["Returns","a","new","edge","connecting","source","and","target","vertices",".","Args",":","source",":","The","source","Vertex",".","target",":","The","target","Vertex",".","Returns",":","A","new","Edge","linking","source","to","target","."]
code: def add_edge(self, source, target):
      """Returns a new edge connecting source and target vertices.
  
      Args:
        source: The source Vertex.
        target: The target Vertex.
  
      Returns:
        A new Edge linking source to target.
      """
      edge = Edge(len(self.edges))
      self.edges.append(edge)
      source.out_edges.append(edge.idx)
      target.in_edges.append(edge.idx)
      edge.source = source.idx
      edge.target = target.idx
      return edge
  
file_path: tensor2tensor/tensor2tensor/insights/graph.py
label_desc: Use image node_id 4 for calling the Graph obj's underlying member method code with example usage: obj.add_edge(source, target) and returns: edge