def _get_index(self,index):
        """Get the current block index, validating and checking status.

        Returns None if the demo is finished"""

        if index is None:
            if self.finished:
                print >>io.stdout, 'Demo finished.  Use <demo_name>.reset() if you want to rerun it.'
                return None
            index = self.block_index
        else:
            self._validate_index(index)
        return index
Get the current block index, validating and checking status.

        Returns None if the demo is finished