code: def _update_count(self, index):
          
          if not isinstance(index, (list, tuple)):
              index = [index]
          for idx in index:
              if idx not in self._index_update_count:
                  self._index_update_count[idx] = self.begin_num_update
              self._index_update_count[idx] += 1
              self.num_update = max(self._index_update_count[idx], self.num_update)
docs: Updates num_update.
  
          Parameters
          ----------
          index : int or list of int
              The index to be updated.