code: public static KamSummary summarizeKamNetwork(Collection<KamEdge> edges,
              int statementCount) {
          KamSummary summary = new KamSummary();
  
          Set<KamNode> nodes = new HashSet<KamNode>(); //unique set of nodes
          for (KamEdge edge : edges) {
              nodes.add(edge.getSourceNode());
              nodes.add(edge.getTargetNode());
          }
  
          summary.setNumOfBELStatements(statementCount);
          summary.setNumOfNodes(nodes.size());
          summary.setNumOfEdges(edges.size());
          return summary;
      }
docs: Summarize nodes and edges
  @param edges
  @param annotationStatements
  @return