'Get a dict mapping the index position to TensMul\'s argument number.'

def _get_indices_to_args_pos(self):

    pos_map = dict()
    pos_counter = 0
    for (arg_i, arg) in enumerate(self.args):
        if (not isinstance(arg, TensExpr)):
            continue
        assert isinstance(arg, Tensor)
        for i in range(arg.ext_rank):
            pos_map[pos_counter] = arg_i
            pos_counter += 1
    return pos_map
