def step(self, progress=0, label=None):
        if self.interactive:
            time_now = time.time()
            if time_now - self.last_update >= minimum_spinner_interval:
                self.last_update = time_now
                state = self.states[self.counter % len(self.states)]
                label = label or self.label
                if not label:
                    raise Exception("No label set for spinner!")
                elif self.total and progress:
                    label = "%s: %.2f%%" % (label, progress/(self.total/100.0))
                elif self.timer and self.timer.elapsed_time > 2:
                    label = "%s (%s)" % (label, self.timer.rounded)
                self.stream.write("%s %s %s ..\r" % (erase_line_code, state, label))
                self.counter += 1
squash datetime objects into ISO8601 strings
dataset/ETHPy150Open xolox/python-humanfriendly/humanfriendly/__init__.py/Spinner.step--crossover with--dataset/ETHPy150Open jupyter/jupyter_client/jupyter_client/jsonutil.py/squash_dates