code: private Edge initNewEdge(GDLParser.EdgeBodyContext edgeBodyContext, boolean isIncoming) {
      boolean hasBody = edgeBodyContext != null;
      Edge e = new Edge();
      e.setId(getNewEdgeId());
      e.setSourceVertexId(getSourceVertexId(isIncoming));
      e.setTargetVertexId(getTargetVertexId(isIncoming));
  
      if (hasBody) {
        List<String> labels = getLabels(edgeBodyContext.header());
        e.setLabels(labels.isEmpty() ?
          useDefaultEdgeLabel ? Collections.singletonList(defaultEdgeLabel) : Collections.emptyList()
          : labels);
        e.setProperties(getProperties(edgeBodyContext.properties()));
        int[] range = parseEdgeLengthContext(edgeBodyContext.edgeLength());
        e.setLowerBound(range[0]);
        e.setUpperBound(range[1]);
      } else {
        if (useDefaultEdgeLabel) {
          e.setLabel(defaultEdgeLabel);
        } else {
          e.setLabel(null);
        }
      }
  
      return e;
    }
docs: Initializes a new edge from the given edge body context.
  
  @param edgeBodyContext edge body context
  @param isIncoming      true, if it's an incoming edge, false for outgoing edge
  @return new edge