keras/src/backend/common/name_scope.py/name_scope/__exit__
class name_scope:    def __exit__(self, *args, **kwargs):
        if self._pop_on_exit:
            name_scope_stack = global_state.get_global_attribute(
                "name_scope_stack"
            )
            name_scope_stack.pop()