def buttonClick(self, event):
        curr = self._window._currentFeature.getValue()
        if curr is None:
            # Navigate from main view to first sample.
            nextt = self._app._allFeatures.firstItemId()
        else:
            # Navigate to next sample
            nextt = self._app._allFeatures.nextItemId(curr)

        while nextt is not None or isinstance(nextt, FeatureSet):
            nextt = self._app._allFeatures.nextItemId(nextt)

        if nextt is not None:
            self._window._currentFeature.setValue(nextt)
        else:
            # could potentially occur if there is an empty section
            self.showNotification('Last sample')
dataset/ETHPy150Open rwl/muntjac/muntjac/demo/sampler/SamplerApplication.py/NextClickListener.buttonClick/operator `and` -> `or`