Add `level()` method for a scope to get the level