Instead of using a separate iterator - diskindex - it's possible to use something like this:

```python
for disk_index, disk in enumerate(settings.get("disks", [])):
   # disk_index will have the value of 0 in this case
   ...
```