Adding method to retrieve labels for a class.