<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def SegmentProd(a, ids):
 """ Segmented prod op. """

    func = lambda idxs: reduce(np.multiply, a[idxs])
    return seg_map(func, a, ids),