code: protected void
              buildProtoNetwork(ProtoNetwork pn,
                      StatementGroup statementGroup,
                      Map<String, Annotation> annotationMap) {
          handleAnnotationGroup(pn, annotationMap,
                  statementGroup.getAnnotationGroup());
  
          // build each statement
          for (Statement statement : statementGroup.getStatements()) {
              if (MacroStatementHelper.isMacroStatement(statement)) {
                  try {
                      List<Statement> expandedStatements =
                              MacroStatementHelper.expand(statement);
                      for (Statement expandedStatement : expandedStatements) {
                          buildProtoNetwork(pn, expandedStatement, annotationMap);
                      }
                  } catch (ProtoNetworkError e) {
                      //invalid statement expansion, skip
                  }
              } else {
                  buildProtoNetwork(pn, statement, annotationMap);
              }
  
          }
  
          // handle nested statement groups
          if (hasItems(statementGroup.getStatementGroups())) {
              for (StatementGroup childStatementGroup : statementGroup
                      .getStatementGroups()) {
                  buildProtoNetwork(pn, childStatementGroup,
                          new HashMap<String, Annotation>(annotationMap));
              }
          }
      }
docs: Builds the {@link ProtoNetwork} at the {@link StatementGroup} level.
  
  @param pn {@link ProtoNetwork}, the proto network
  @param statementGroup {@link StatementGroup}, the statement group
  @param annotationMap {@link Map}, the parent statement group annotations
  accumulated to this point