docs: public long[] getAssignmentsRelabeled(int[] relabeling) {
      int[] uniqueVars = syntaxUniqueVars;
      long[] relabeledAssignments = new long[assignments.length];
      Arrays.fill(relabeledAssignments, -1);
      int numFilled = 0;
  
      for (int i = 0; i < assignments.length; i++) {
        int assignmentVarNum = CcgParser.getAssignmentVarNum(assignments[i]);
        for (int j = 0; j < uniqueVars.length; j++) {
          if (uniqueVars[j] == assignmentVarNum) {
            if (relabeling[j] != -1) {
              relabeledAssignments[numFilled] = CcgParser.replaceAssignmentVarNum(assignments[i],
                  assignmentVarNum, relabeling[j]); 
              numFilled++;
            }
          }
        }
      }
  
      if (numFilled < assignments.length) {
        return Arrays.copyOf(relabeledAssignments, numFilled);
      } else {
        return relabeledAssignments;
      }
    }