code: private void assertPassOrder(
        List<PassFactory> passList, PassFactory pass1, PassFactory pass2, String msg) {
      int pass1Index = passList.indexOf(pass1);
      int pass2Index = passList.indexOf(pass2);
      if (pass1Index != -1 && pass2Index != -1) {
        checkState(pass1Index < pass2Index, msg);
      }
    }
docs: Checks that {@code pass1} comes before {@code pass2} in {@code passList}, if both are present.