docs: private Stream<ConceptSetMeasure> runComputeDegree(GraqlCompute.Centrality query) {
          Set<Label> targetTypeLabels;
  
          // Check if ofType is valid before returning emptyMap
          if (query.of().isEmpty()) {
              targetTypeLabels = scopeTypeLabels(query);
          } else {
              targetTypeLabels = query.of().stream()
                      .flatMap(t -> {
                          Label typeLabel = Label.of(t);
                          Type type = tx.getSchemaConcept(typeLabel);
                          if (type == null) throw GraqlQueryException.labelNotFound(typeLabel);
                          return type.subs();
                      })
                      .map(SchemaConcept::label)
                      .collect(toSet());
          }
  
          Set<Label> scopeTypeLabels = Sets.union(scopeTypeLabels(query), targetTypeLabels);
  
          if (!scopeContainsInstance(query)) {
              return Stream.empty();
          }
  
          Set<LabelId> scopeTypeLabelIDs = convertLabelsToIds(scopeTypeLabels);
          Set<LabelId> targetTypeLabelIDs = convertLabelsToIds(targetTypeLabels);
  
          ComputerResult computerResult = compute(new DegreeVertexProgram(targetTypeLabelIDs),
                                                  new DegreeDistributionMapReduce(targetTypeLabelIDs, DegreeVertexProgram.DEGREE),
                                                  scopeTypeLabelIDs);
  
          Map<Long, Set<ConceptId>> centralityMap = computerResult.memory().get(DegreeDistributionMapReduce.class.getName());
  
          return centralityMap.entrySet().stream()
                  .map(centrality -> new ConceptSetMeasure(centrality.getValue(), centrality.getKey()));
      }