keras/src/backend/tensorflow/core.py/name_scope/__exit__
class name_scope:    def __exit__(self, *args, **kwargs):
        super().__exit__(*args, **kwargs)
        if self._pop_on_exit:
            self._tf_name_scope.__exit__(*args, **kwargs)