This will result in a best case running time proportional to the length of `index_data`, which is also the worst case. You can speed up the best case by doing,

```python
all(isinstance(x, tuple) for x in index_data)
```
since `all` with a generator expression will return `False` as soon as a `False` is returned from the generator. This also has the benefit of working with subclasses of `tuple`.