docs: public PatternElementMatch getLastLabeledMatch(String label) {
          PatternElementMatch cur = this;
          while (cur != null) {
              String elementLabel = cur.patternElement.getLabel();
              if (elementLabel != null && elementLabel.equals(label)) {
                  return cur;
              }
              cur = cur.prev;
          }
          return null;
      }