Add ability to query for labels of a class (hattip Pierre)