Use klass instead of self for some classmethods