def METHOD_NAME(data_out, data_in, is_first_in_pair, idx, length):
    data_out[:] = 0
    for i in numba.prange(length - 1):  # pylint: disable=not-an-iterable
        if is_first_in_pair[i]:
            data_out[i // 2] = data_in[idx[i]] * data_in[idx[i + 1]]