code: def _iter_ns_range(self):
      
      while True:
        if self._current_key_range is None:
          query = self._ns_range.make_datastore_query()
          namespace_result = query.Get(1)
          if not namespace_result:
            break
  
          namespace = namespace_result[0].name() or ""
          self._current_key_range = key_range.KeyRange(
              namespace=namespace, _app=self._ns_range.app)
          yield ALLOW_CHECKPOINT
  
        for key, o in self._iter_key_range(
            copy.deepcopy(self._current_key_range)):
          # The caller must consume yielded values so advancing the KeyRange
          # before yielding is safe.
          self._current_key_range.advance(key)
          yield o
  
        if (self._ns_range.is_single_namespace or
            self._current_key_range.namespace == self._ns_range.namespace_end):
          break
        self._ns_range = self._ns_range.with_start_after(
            self._current_key_range.namespace)
        self._current_key_range = None
docs: Iterates over self._ns_range, delegating to self._iter_key_range().