def next(self):
        if self.mode == 'bounded':
            raise Exception("The next() method should only be called in "
                            "one of the open modes.")

        args = () if self.call_mode == 'generator' else (self.counter,)
        retval = self._execute_callback(*args)

        (key, val) = (retval if isinstance(retval, tuple)
                      else (self.counter, retval))

        key = util.wrap_tuple(key)
        if len(key) != len(self.key_dimensions):
            raise Exception("Generated key does not match the number of key dimensions")

        self._cache(key, val)
        self.counter += 1
        return val

    # For Python 2 and 3 compatibility
Retrieve the text in a TextBox widget
dataset/ETHPy150Open ioam/holoviews/holoviews/core/spaces.py/DynamicMap.next--crossover with--dataset/ETHPy150Open qtile/qtile/libqtile/widget/textbox.py/TextBox.cmd_get