code: public String[] contextLabels(String primaryKey) {
          // Get the mapping from primarykeys to context descriptors.
          List<Assignment> primaryAssignments = assignmentMap.get(primaryKey);
  
          // Return an empty array if one does not exist.
          if (primaryAssignments == null)
              return new String[0];
  
          // Copy the label assignments for each context id recorded.  Here we
          // assume that the largest_context_id == (#id's_recorded - 1).
          String[] labels = new String[primaryAssignments.size()];
          for (Assignment assignment : primaryAssignments)
              labels[assignment.id] = assignment.key;
          return labels;
      }
docs: {@inheritDoc}