def __getitem__(self, index):
        i = 0
        for run in self.runs:
            if i <= index < i + run.count:
                return run.value
            i += run.count

        # Append insertion point
        if index == i:
            return self.runs[-1].value

        assert False, 'Index not in range'
Return whether the specified location is on the visible screen.
dataset/ETHPy150Open ardekantur/pyglet/pyglet/text/runlist.py/RunList.__getitem__--crossover with--dataset/ETHPy150Open peterbrittain/asciimatics/asciimatics/screen.py/_AbstractCanvas.is_visible