This is really bad (I know, it's not your fault) - we should really use function templates here.  If you like C++ templates, then have a look on `MultilabelLabels::to_dense`.  Just a side note; no need to change it right now.