def METHOD_NAME(self, hot_indices, end_padding, gc, dc):
    def one_hot_ref(hot_indices, size):
        out = np.zeros([len(hot_indices), size], dtype=float)
        x = enumerate(hot_indices)
        for i, x in enumerate(hot_indices):
            out[i, x] = 1.
        return (out, )
    size = np.array(max(hot_indices) + end_padding + 1, dtype=np.int64)
    if size == 0:
        size = 1
    op = core.CreateOperator('OneHot', ['hot_indices', 'size'], ['output'])
    self.assertReferenceChecks(
        gc,
        op,
        [hot_indices, size],
        one_hot_ref,
        input_device_options={'size': core.DeviceOption(caffe2_pb2.CPU)})