This is exactly the stuff I want unit-tests for.  Suggested changes:
* this code shouldn't happen in StructuredAccuracy, because now it cannot be reused for non-so-multilabels
* we should add unit tests for a few examples