code: def build_word_rewards(self, vocab_size, word_reward, unk_reward):
      word_rewards = np.full(
          [vocab_size], word_reward, dtype=np.float32
      )
      word_rewards[seq2seq_util.PAD_ID] = 0
      word_rewards[seq2seq_util.GO_ID] = 0
      word_rewards[seq2seq_util.EOS_ID] = 0
      word_rewards[seq2seq_util.UNK_ID] = word_reward + unk_reward
      return word_rewards
  
imports: from abc import ABCMeta, abstractmethod
  import argparse
  import logging
  import numpy
  import sys
  from caffe2.python import core, rnn_cell, workspace
  from caffe2.python.models.seq2seq.beam_search import BeamSearchForwardOnly
  from caffe2.python.models.seq2seq.seq2seq_model_helper import Seq2SeqModelHelper
  import caffe2.python.models.seq2seq.seq2seq_util
label_desc: Use image node_id 3 for calling the Seq2SeqModelCaffe2EnsembleDecoderBase obj's underlying member method code with example usage: obj.build_word_rewards(vocab_size, word_reward, unk_reward) and returns: word_rewards