I think this would be a more elegant means of achieving this functionality:
```
for idx_x in range( max(0, start_idx_x), min(final_idx_x, len(self._tilemap)) ):
    for idx_y in range( max(0, start_idx_y), min(final_idx_y, len(self._tilemap[0])) ):
```