code: private void processEdge(GDLParser.EdgeBodyContext edgeBodyContext, boolean isIncoming) {
      String variable = null;
      Edge e;
  
      if (edgeBodyContext != null) {
        variable = getVariable(edgeBodyContext.header());
      }
      if (variable != null && userEdgeCache.containsKey(variable)) {
        e = userEdgeCache.get(variable);
      } else {
        e = initNewEdge(edgeBodyContext, isIncoming);
  
        if (variable != null) {
          userEdgeCache.put(variable, e);
        } else {
          variable = String.format(ANONYMOUS_EDGE_VARIABLE, e.getId());
          autoEdgeCache.put(variable, e);
        }
        e.setVariable(variable);
        edges.add(e);
      }
      updateGraphElement(e);
      setLastSeenEdge(e);
    }
docs: Processes incoming and outgoing edges.
  
  Checks if the edge has already been created (using its variable). If not, a new edge is created
  and added to the edge cache.
  
  @param edgeBodyContext edge body context
  @param isIncoming      true, if edge is incoming, false for outgoing edge