<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def level(self):
 """Return the current scope level """

        res = len(self._scope_stack)
        if self._parent is not None:
            res += self._parent.level()
        return res