Python dunder-methods reference.
Convert an object to an integer for use as a sequence index.
__index__(self)