code: def SparseSegmentSqrtN(a, idxs, ids):
      
      func = lambda _idxs: np.divide(reduce(np.add, a[idxs][_idxs]), np.math.sqrt(len(_idxs)))
      return seg_map(func, a, ids),
docs: Sparse segmented sum / sqrt(n=len(idxs)) op.