grain.transforms.MapWithIndex# class grain.transforms.MapWithIndex# Abstract base class for 1:1 transformations of elements and their index. Implementations should be threadsafe since they are often executed in parallel. __init__()# Methods __init__() map_with_index(index, element) Maps a single element with its index.