def METHOD_NAME(self, hot_indices):
    index_size, lengths, indices = hot_indices
    index_size = np.array(index_size, dtype=np.int64)
    lengths = np.array(lengths, dtype=np.int32)
    indices = np.array(indices, dtype=np.int64)
    def segment_one_hot_ref(lengths, hot_indices, size):
        offset = 0
        out = np.zeros([len(lengths), size], dtype=float)
        for i, length in enumerate(lengths):
            for idx in hot_indices[offset:offset + length]:
                out[i, idx] = 1.
            offset += length
        return (out, )
    op = core.CreateOperator(
        'SegmentOneHot',
        ['lengths', 'hot_indices', 'size'],
        ['output'])
    self.assertReferenceChecks(
        hu.cpu_do,
        op,
        [lengths, indices, index_size],
        segment_one_hot_ref)