code: def _iterate(self, **kwargs):
          
          # Sample item
          loc, weight, extra_info = self._sample_item(**kwargs)
          # Query label
          ell = self._query_label(loc)
          # Get predictions
          ell_hat = self.predictions[loc,:]
  
          if self.debug == True:
              print("Sampled label {} for item {}.".format(ell,loc))
  
          # Update
          self._update_estimate_and_sampler(ell, ell_hat, weight, extra_info, **kwargs)
  
          self.t_ = self.t_ + 1
docs: Procedure for a single iteration (sampling and updating)