code: @Exported
      public Set<LabelAtom> getAssignedLabels() {
          Set<LabelAtom> r = Label.parse(getLabelString());
          r.add(getSelfLabel());
          r.addAll(getDynamicLabels());
          return Collections.unmodifiableSet(r);
      }
docs: Returns the possibly empty set of labels that are assigned to this node,
  including the automatic {@link #getSelfLabel() self label}, manually
  assigned labels and dynamically assigned labels via the
  {@link LabelFinder} extension point.
  
  This method has a side effect of updating the hudson-wide set of labels
  and should be called after events that will change that - e.g. a agent
  connecting.