<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def map_indices(fn, iterable, indices):
 r""" Map a function across indices of an iterable. Notes ----- Roughly equivalent to, though more efficient than:: lambda fn, iterable, *indices: (fn(arg) if i in indices else arg for i, arg in enumerate(iterable)) Examples -------- [12, 6, 7, 3, 6, 24, 2] [2.1972245773362196, array([ 5., 6., 2.]), array([[ 1.60943791, 1.79175947, 0.69314718], [ 0.69314718, 1.09861229, 2.19722458]])] .. todo:: Floating point precision [9., array([5., 6., 2.]), array([[ 5., 6., 2.], [ 2., 3., 9.]])] """

    index_set = set(indices)
    for i, arg in enumerate(iterable):
        if i in index_set:
            yield fn(arg)
        else:
            yield arg