Replace post-processing with API call for setting node degree calculation. `setNodeDegreeDict` in `/src/lib/utils.ts`