Procedure for a single iteration (sampling and updating)

def _iterate(self, **kwargs):
        """Procedure for a single iteration (sampling and updating)"""
        # 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